Create jlink / jpackage native runtimes
|java11 javafx webstart jlink jpackage windows macosx
|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 :)
Change History (39)
comment:1 by , 5 years ago
|Create jlink native runtimes using Azure Pipelines → Create jlink native runtimes
comment:2 by , 3 years ago
|jlink jpackage added
|Create jlink native runtimes → Create jlink / jpackage native runtimes