Opened 3 months ago

Last modified 3 months ago

#17083 assigned enhancement

Create jlink native runtimes

Reported by: Don-vip Owned by: Don-vip
Priority: normal Milestone:
Component: Core Version:
Keywords: java11 javafx webstart Cc: stoecker, simon04, floscher, michael2402, wiktorn


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 (0)

Change History (1)

comment:1 Changed 3 months ago by Don-vip

Summary: Create jlink native runtimes using Azure PipelinesCreate jlink native runtimes

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.

Modify Ticket

Change Properties
Set your email in Preferences
as assigned The owner will remain Don-vip.
as The resolution will be set.
to The owner will be changed from Don-vip to the specified user.
The owner will change to Don-vip
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.