#17083 closed enhancement (fixed)
Create jlink / jpackage native runtimes
| Reported by: | Don-vip | Owned by: | Don-vip |
|---|---|---|---|
| Priority: | major | Milestone: | 21.08 |
| Component: | Core | Version: | |
| Keywords: | java11 javafx webstart jlink jpackage windows macosx | Cc: | stoecker, simon04, floscher, michael2402, wiktorn |
Description
With the end of Java WebStart and public JRE availability from Oracle (end of 2020) we need to find another deployment technology that matches our needs:
- still offer a simple jar for power users, and Linux distributions that include the Java and JavaFX runtimes, as they manage the security updates themselves
- provide a simple way for Windows and macOS users to get JOSM, Java and JavaFX runtimes
- provide a light mechanism to get JOSM latest updates every day
- make sure users get Java security updates if we ship the runtimes ourselves
Java 9 introduced a new tool (jlink) to create custom Java runtimes that only include the classes needed for an application. It allows to create smaller runtimes and also gives a significant boost when starting the JVM (less stuff to load).
I never considered it seriously until today because jlink does not allow cross-platform builds. So if we go this way, we need to get three build servers (Linux, Windows, macOS).
I found today an open source project that managed to do it. The results in size are quite impressive (less than 40 Mb). This is achieved using Azure Pipelines: Microsoft provides a free offer for open source projects (10 free parallel jobs with unlimited minutes).
I will try to build native runtimes with OpenJDK 11, JavaFX 11 and JOSM to see if it works :)
Attachments (1)
Change History (39)
comment:1 by , 7 years ago
| Summary: | Create jlink native runtimes using Azure Pipelines → Create jlink native runtimes |
|---|
comment:2 by , 4 years ago
| Keywords: | jlink jpackage added |
|---|---|
| Summary: | Create jlink native runtimes → Create jlink / jpackage native runtimes |
In the course of #18319 a jpackage-based script (which uses jlink under the hood) has been developed for macOS. Could be useful for Windows too.
comment:4 by , 4 years ago
| Milestone: | → Longterm |
|---|
by , 4 years ago
| Attachment: | josmlic.png added |
|---|
comment:21 by , 4 years ago
follow-up: 23 comment:22 by , 4 years ago
The GPL is no EULA. It must not be accepted to use the software, so I don't think that's useful.
comment:23 by , 4 years ago
Replying to stoecker:
The GPL is no EULA. It must not be accepted to use the software, so I don't think that's useful.
OK, thanks!
comment:27 by , 4 years ago
| Milestone: | Longterm → 21.08 |
|---|
comment:32 by , 4 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
And I guess this is fixed!
comment:33 by , 4 years ago
| Keywords: | windows macosx added |
|---|
comment:34 by , 4 years ago
| Priority: | normal → major |
|---|




Ah it seems I totally misunderstood what jlink was capable of. We cannot create a single image that runs on different OS, but we should be able on a given host to create images targeted for a different OS. So we might not need the Microsoft offer at all, if we can create the images on our Linux server.