JEP 343, first written up in April 2018, proposes to develop a simple packaging tool for Java apps. Rather than just stopping at existing packaging norms (JAR, WAR, and EAR), this proposal seeks to define a tool that creates an executable containing the runtime environment and the app as a single file: an .msi or .exe file on Microsoft Windows, a pkg or app file on macOS, and deb or rpm on Linux.
In this sense, JEP 343 aims to duplicate the ability of existing packaging tools, such as Inno Setup and Wix. Interest in this topic is driven by two trends: the greater use of containers, in which an entire app bundled with the necessary runtime is a desirable deployment option, and the advent of Java modules as of Java 9. With modules and the jlink tool, it’s fairly straightforward to identify the modules in the JRE needed to run the app—leading to skinny deployables and executables.
The proposed solution, called jpackager, might include some discussed options such as generating executables that will meet the criteria for release through Windows and macOS app stores. Also under consideration is a similar solution that could launch multiple applications simultaneously in the same container or on the same platform.
If you’ve ever had to step users through the process of downloading and installing a JRE so that they could run your app, you understand how welcome a turnkey solution such as the proposed tool would be.
All current and former JEPs can be found on the Oracle Open JDK site.
Java Magazine staff (javamag_us@oracle.com, @Oraclejavamag) deliver authoritative information about Java, the JVM, and JVM languages to a community of more than one-quarter million developers.