What’s coming in Java 16

by Joseph K. Clark

Java 16 is scheduled to be released on March 16. Here is a look at what changes you can expect in the release.

JEP 338: Vector API (Incubator)

This Java Enhancement Proposal (JEP) will provide an initial iteration of an incubator module that can express vector calculations compiled at runtime. This module will be clear and concise, platform-agnostic, have reliable runtime compilation and performance on x64 and AArch64 architectures, and offer graceful degradation when a vector computation cannot be fully expressed, the OpenJDK team explained. 

JEP 347: Enable C++14 Language Features

This addition aims to support C++14 language features and give specific guidance on which features can be used in HotSpot code. 

JEP 357: Migrate from Mercurial to Git

This JEP relates to the goal of migrating the OpenJDK Community’s source code repositories from Mercurial to Git. 

JEP 369: Migrate to GitHub

Similar to JEP 357, this relates to the goal of hosting the OpenJDK Community’s Git repositories on GitHub. All single-repository OpenJDK projects will be migrated, including JDK feature releases and update releases for versions 11 and later. 

Java 16

JEP 376: ZGC: Concurrent Thread-Stack Processing

This will remove thread-stack processing from ZGC savepoints, make stack processing lazy, cooperative, concurrent, and incremental, remove per-thread root processing from ZGC savepoints, and provide a mechanism for HotSpot subsystems to lazily process stacks, according to OpenJDK. 

JEP 380: Unix-domain Socket Channels

Unix-domain sockets are used for inter-process communication. They are similar to TCP/IP sockets but are addressed by filesystem pathnames instead of IP addresses and port numbers. It is intended for Java to support all Unix-domain socket features standard across major Unix platforms and Windows. 

JEP 386: Alpine Linux Port

This JEP aims to port the JDK to Alpine Linux and other Linux distributions that use musl as their primary C library. 

JEP 387: Elastic Metaspace

According to OpenJDK, Metaspace has been notorious for using a lot of off-heap memory, so’s goals feature goal is to return new HotSpot class metadata to the operating system and reduce the Metaspace footprint, simplify Metaspace code to reduce maintenance costs. 

JEP 388: Windows/AArch64 Port

The JDK will complete its port to Windows/AArch64. 

JEP 389: Foreign Linker API (Incubator)

Java will introduce an API that offers “statically typed, pure-Java access to native code.” In combination with the Foreign-Memory API, this will simplify the process of binding to a native library, which is an error-prone process. 

JEP 390: Warnings for Value-Based Classes

This feature will designate primitive wrapper classes as value-based. It will also deprecate their constructors for removal, which will launch new deprecation warnings. 

JEP 392: Packaging Tool

The new package tool can be used to package Java applications. 

JEP 393: Foreign-Memory Access API (Third Incubator)

This API enables applications to access foreign memory outside the Java heap safely. It was created because many Java applications access foreign memory, but the Java API doesn’t have an efficient or safe way of accessing foreign memory. 

JEP 394: Pattern Matching, for instanceof

This feature aims to enhance the pattern-matching capability of the instanceof operator. According to the OpenJDK team, pattern matching allows common logic to be expressed concisely and safely.  

JEP 395: Records

Records are classes that can act as “transparent carriers for immutable data,” the OpenJDK team explained. They can be helpful with modeling data aggregates.

Related Posts