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.

Java 14

JDK 14 does not disappoint. In the latest JDK update, we see the usual API changes and low-level JVM enhancements, as well as exciting new language preview features and simplified debugging with NPE.

General, Safe, and Deterministic Foreign Memory Access in JDK 14

Let's look at the numerous JDK 14-targeted features available, specifically the Foreign Memory API.

In the post "JDK 14 Rampdown: Build 27," I summarized the numerous JDK 14-targeted features newly available with JDK 14 Early Access Build #27. There is already another JDK 14 Early Access Build available and this one [ Build 28 (2019/12/18)] includes one particularly interesting feature: Enhancement JDK-8234049 ["Implementation of Memory Access API (Incubator)"].

JDK 14: Records, Text Blocks, and More

Learn more about these five new proposed JEPs targeted for JDK 14.

On Monday, Mark Reinhold's post "JEPs proposed to target JDK 14: 305, 343, 359, 366, & 368" proposed targeting five more JEPs to JDK 14. Some highly anticipated features are among this group, although all but one are proposed to be in "preview" or "incubating":

  • JEP 305: Pattern Matching for instanceof (Preview)
  • JEP 343: Packaging Tool (Incubator)
  • JEP 359: Records (Preview)
  • JEP 366: Deprecate the ParallelScavenge + SerialOld GC Combination
  • JEP 368: Text Blocks (Second Preview)

The Java SE 13 Java Language Updates document describes preview features (JEP 12): "A preview feature is a new feature whose design, specification, and implementation are complete, but which is not permanent, which means that the feature may exist in a different form or not at all in future JDK releases."

JDK 14: CMS GC Is OBE

JDK 14 Early Access Build #23 is now available.

JDK 14 Early Access Build #23 ( 2019/11/13) is now available. One of the more noteworthy changes with this build is the removal of the Concurrent Mark Sweep garbage collector. JEP 291 ["Deprecate the Concurrent Mark Sweep (CMS) Garbage Collector"] deprecated the Concurrent Mark Sweep (CMS) garbage collector back in 2017 with JDK 9 and JEP 363 ["Remove the Concurrent Mark Sweep (CMS) Garbage Collector"] has been targeted for JDK 14 to remove the CMS garbage collector altogether.

The next screen snapshot demonstrates that the CMS garbage collector was still available with JDK 14 Early Access Build #22.

Six More JEPs Proposed for JDK 14

Check out the newest proposals for JDK 14!

A recent Mark Reinhold message announces six new "JEPs proposed to target JDK 14": JEP 345, JEP 361, JEP 363, JEP 364, JEP 365, and JEP 367. Assuming no objections are made by November 7, these JEPs will be targeted to JDK 14 along with previously targeted JEPs JEP 349 ("JFR Event Streaming"), JEP 352 ("Non-Volatile Mapped Byte Buffers"), and JEP 358 (" Helpful NullPointerExceptions"). This post summarizes each of these six JEPs proposed for targeting JDK 14.

JEP 345: NUMA-Aware Memory Allocation for G1

The succinct "Summary" of JEP 345 states, "Improve G1 performance on large machines by implementing NUMA-aware memory allocation." Two important "non-goals" of this JEP indicate that the JEP is only intended to add NUMA (non-uniform memory access) support to the G1 garbage collector and only for Linux. However, the JEP also points out that "the parallel collector, enabled by -XX:+UseParallelGC, has been NUMA-aware for many years."

Signs of JDK 14 Beginning to Appear

JDK 13 is currently in Rampdown Phase 1 (RDP 1), is scheduled to enter Rampdown Phase 2 (RDP 2) in a little over one week (on July 18, 2019), and is tentatively scheduled for General Availability on September 17, 2019. What this means, of course, is that it's time to start thinking about JDK 14! This post references and summarizes some of the online resources related to JDK 14 that are starting to appear.

Project JDK 14

The main OpenJDK JDK 14 page is the best place to start when wishing to see an overview of the release and its progress. Besides a reference to its associated specification (JSR 389: "Java SE 14 Platform"), the only other information available on this page as of this writing is a simple "Status" paragraph that references development repositories and the JDK Enhancement Proposal (JEP) process.