The jpackage Utility Revisited for JDK14 [Video]

A previous post of mine introduced and demonstrated jpackage, a utility that enables the packaging up of Java applications in native installer format for Windows, MacOS or Linux.  Kindly disregard that post, and instead use the associated video in this article as a current reference. At the time of the original article's creation, it was in early prototype form and only available in a special build of JDK13. With the arrival of JDK14, jpackage has been formally incorporated into the JDK as an incubator module called jdk.incubator.jpackage. The rationale for revisiting this topic lies in the fact that APIs have changed; in particular, the command-line arguments associated with the jpackage utility are different.

The video that follows walks through the building of a sample modularized Java application, then proceeds to first create a jlink'ed runtime image of that application, before ultimately demonstrating how to use jpackage to create a Windows-native installer of that application. It then briefly shows how those same tasks can be performed on Linux and MacOS platforms too.

Make Your Own MSI (and RPM, DEB, and DMG) with JDK14

Throughout much of its long history, Java Runtime Environments for MS-Windows have traditionally been packaged up in the venerable EXE format for installation.  This made for a well understood, straightforward and standard way of installing Java for individual users, unfortunately at the expense of those tasked with managing Windows systems en masse.  EXE files don't necessarily play well in the Windows systems administration world where tools like Microsoft SCCM and many other capable alternatives are used.  A more preferable payload is the MSI format.  The equivalents in the Linux and macOS world would be the RPM/DEB and DMG formats respectively.

To help rectify this shortcoming, some organizations have seen fit to produce their own MSI versions. Oracle, for example, provides an Enterprise MSI Installer for its Java SE Subscription customers with its Oracle JDK 7 and JDK 8 releases. Among the litany of Open JDK distributions, a few have also decided to package up their own MSI versions too.