News
Java 16 Goes GA on March 16 Includes 17 Enhancements
- By John K. Waters
- March 10, 2021
The general availability (GA) release of the Java 16 Platform (Java SE 16) and the Oracle Java Development Kit (Oracle JDK) is set for March 16.
Oracle JDK 16 will be a short-term support release, which will be obsolete after the Long Term Support (LTS) release of Java 17 in September, but it comes with a long list of enhancements and upgrades, including Pattern Matching for instanceof; Records, previewed in Java 14; the new Packaging Tool; incubating versions of the Vector API, the Foreign Linker API, and the Foreign-Memory Access API; Sealed Classes, which is a preview feature.
The complete list of features in this release includes:
JEP 338: Vector API (Incubator)
Provides an initial iteration of an incubator module, jdk.incubator.vector, to express vector computations that reliably compile at runtime to optimal vector hardware instructions on supported CPU architectures and thus achieve superior performance to equivalent scalar computations.
JEP 347: Enable C++14 Language Features
Allows the use of C++14 language features in JDK C++ source code, and give specific guidance about which of those features may be used in HotSpot code.
JEP 357: Migrate from Mercurial to Git
Migrates the OpenJDK Community's source code repositories from Mercurial (hg) to Git.
JEP 369: Migrate to GitHub
Hosts the OpenJDK Community's Git repositories on GitHub. In concert with JEP 357 (Migrate from Mercurial to Git), this would migrate all single-repository OpenJDK Projects to GitHub, including both JDK feature releases and JDK update releases for versions 11 and later.
JEP 376: ZGC, Concurrent Thread-Stack Processing
Moves ZGC thread-stack processing from safepoints to a concurrent phase.
JEP 380: Unix-Domain Socket Channels
Adds Unix-domain (AF_UNIX) socket support to the socket channel and server-socket channel APIs in the java.nio.channels package. Extend the inherited channel mechanism to support Unix-domain socket channels and server socket channels.
JEP 386: Alpine Linux Port
Ports the JDK to Alpine Linux, and to other Linux distributions that use musl as their primary C library, on both the x64 and AArch64 architectures
JEP 387: Elastic Metaspace
Returns unused HotSpot class-metadata (i.e. metaspace) memory to the operating system more promptly, reduce metaspace footprint, and simplify the metaspace code in order to reduce maintenance costs.
JEP 388: Windows/AArch64 Port
Ports the JDK to Windows/AArch64.
JEP 389: Foreign Linker API (Incubator)
Introduces an API that offers statically-typed, pure-Java access to native code. This API, together with the Foreign-Memory API (JEP 393), will considerably simplify the otherwise error-prone process of binding to a native library.
390: Warnings for Value-Based Classes
JEP 392: Packaging Tool
Provides the jpackage tool, for packaging self-contained Java applications.
JEP 393: Foreign-Memory Access API (Third Incubator)
Designates the primitive wrapper classes as value-based and deprecate their constructors for removal, prompting new deprecation warnings. Provide warnings about improper attempts to synchronize on instances of any value-based classes in the Java Platform.
JEP 394: Pattern Matching for instanceof:
Enhances the Java programming language with pattern matching for the instanceof operator. Pattern matching allows common logic in a program, namely the conditional extraction of components from objects, to be expressed more concisely and safely.
JEP 395: Records:
Enhances the Java programming language with records, which are classes that act as transparent carriers for immutable data. Records can be thought of as nominal tuples.
JEP 396: Strongly Encapsulate JDK Internals by Default
Strongly encapsulates all internal elements of the JDK by default, except for critical internal APIs such as sun.misc.Unsafe. Allow end users to choose the relaxed strong encapsulation that has been the default since JDK 9.
JEP 397: Sealed Classes (Second Preview)
Enhance the Java programming language with sealed classes and interfaces. Sealed classes and interfaces restrict which other classes or interfaces may extend or implement them.
Java SE 16 is the core Java platform based on specifications defined in JSR 391 in the Java Community Process (JCP). OpenJDK 16 is the open-source Reference Implementation of Java SE 16. The Oracle JDK is based on OpenJDK, which supports the development of both.
About the Author
John K. Waters is the editor in chief of a number of Converge360.com sites, with a focus on high-end development, AI and future tech. He's been writing about cutting-edge technologies and culture of Silicon Valley for more than two decades, and he's written more than a dozen books. He also co-scripted the documentary film Silicon Valley: A 100 Year Renaissance, which aired on PBS. He can be reached at [email protected].