Oracle has released version 16 of the Java programming language and virtual machine.
InfoQ originally reported on this release in November 2020 and there have been no substantial changes to the release since then.
The final feature list is:
- JEP 338: Vector API (Incubator)
- JEP 347: Enable C++14 Language Features
- JEP 357: Migrate from Mercurial to Git
- JEP 369: Migrate to GitHub
- JEP 376: ZGC: Concurrent Thread-Stack Processing
- JEP 380: Unix-Domain Socket Channels
- JEP 386: Alpine Linux Port
- JEP 387: Elastic Metaspace
- JEP 388: Windows/AArch64 Port
- JEP 389: Foreign Linker API (Incubator)
- JEP 390: Warnings for Value-Based Classes
- JEP 392: Packaging Tool
- JEP 393: Foreign-Memory Access API (Third Incubator)
- JEP 394: Pattern Matching for instanceof
- JEP 395: Records
- JEP 396: Strongly Encapsulate JDK Internals by Default
- JEP 397: Sealed Classes (Second Preview)
The feature cadence remains similar to previous releases with 17 features being delivered in Java 16, versus 14 features for Java 15 and 16 features delivered in Java 14.
Oracle was responsible for just over 2/3rds of the issues fixed in Java 16, with Red Hat, SAP, Tencent and ARM being the largest non-Oracle contributors.
One important caveat is that the popular Gradle build tool is not yet compatible with Java 16, due to a dependency on the ASM bytecode manipulation library. This will be fixed in the coming weeks, and stems from the lack of a general purpose, user-accessible bytecode manipulation framework in the JDK itself. As it stands today, Gradle users are unable to upgrade to Java 16 and there is no workaround.
Java 16 is not a long-term support release, and will be obsoleted by the next release, Java 17 (which is an LTS release) in September 2021.
Currently, only two JEPs are targeted at Java 17:
- JEP 356: Enhanced Pseudo-Random Number Generators
- JEP 382: New macOS Rendering Pipeline
with two further JEPs as Proposed to Target:
- JEP 391 macOS/AArch64 Port
- JEP 398 Deprecate the Applet API for Removal
It is also quite likely that some of the currently Preview and Incubator features will reach production as part of Java 17. In particular, both of these Java 16 JEPs may have a final release next time:
- Foreign-Memory Access API
- Sealed Classes
This has not been confirmed by Oracle yet, however.
In addition, in recent weeks several Draft JEPs relating to the basic mechanisms of Project Valhalla have been filed or updated, but these JEPs would not be expected to be delivered in final state without at least one (and more likely several) round of incubation first.
No release date for Java 17 has been announced yet, but it is anticipated to be delivered in mid-September, with a feature freeze in mid-June 2021.
Java 16 can be downloaded from Oracle now with binaries from other vendors expected to become available in the coming days.