No matter the size of your company, Azul offers competitive pricing options to fit your needs, your budget, and your ambition.
No matter the size of your company, Azul offers competitive pricing options to fit your needs, your budget, and your ambition.
Java 16 is a non-LTS feature release following Java 15. It preceded Java 17 LTS (September 2021). Java 16 reached end-of-life in September 2021 and receives no further updates.
| Release Date | March 16, 2021 |
| LTS | No |
| OpenJDK End-of-Life | September 15, 2021 |
| Notable For | Records finalized, pattern matching for instanceof finalized, strong encapsulation of JDK internals |
Java 16 is end-of-life. Organizations running it should upgrade to a current LTS release: Java 17, Java 21, or Java 25.
Records (JEP 395)
Records are finalized. A compact syntax for immutable data carriers where the compiler generates the constructor, accessors, equals, hashCode, and toString. Previewed in Java 14 (JEP 359) and 15 (JEP 384), final in Java 16.
record Point(int x, int y) {
// Compiler generates: constructor, x(), y(), equals, hashCode, toString
}
record Employee(String name, int id, String department) {}
Pattern Matching for instanceof (JEP 394)
Pattern matching for instanceof is finalized. The binding variable eliminates the need for an explicit cast. Previewed in Java 14 (JEP 305) and 15 (JEP 375), final in Java 16.
if (obj instanceof String s) {
// s is already a String, no cast needed
System.out.println(s.length());
}
Java 16 API Changes
Unix-Domain Socket Channels (JEP 380)
java.nio.channels now supports Unix-domain sockets (AF_UNIX) via ServerSocketChannel and SocketChannel. Unix-domain sockets provide local inter-process communication with lower latency and higher throughput than TCP loopback connections. Used by container runtimes, database drivers (PostgreSQL, MySQL), and local service mesh sidecars.
Warnings for Value-Based Classes (JEP 390)
The compiler and runtime now emit warnings when value-based classes (like Optional, LocalDate, Integer) are used in ways incompatible with future value types: synchronization, identity-sensitive operations, or as synchronized monitor objects. Prepares the ecosystem for Project Valhalla’s primitive classes.
Packaging Tool (JEP 392)
jpackage is production-ready. Creates native installers (msi, rpm, deb, pkg, dmg) that bundle a JVM with the application. Incubated in Java 14 (JEP 343), final in Java 16.
jpackage –name myapp –input target/ –main-jar myapp.jar –type deb
Foreign Linker API (Incubator, JEP 389)
An incubator API for calling native C functions from Java without JNI. Replaces the manual process of writing JNI native method stubs, header files, and C glue code. This incubated in Java 16; the Foreign Function and Memory API was finalized in Java 22 (JEP 454).
Foreign-Memory Access API (Third Incubator, JEP 393)
Third incubation. Refined the API based on feedback from Java 14 and 15 incubations. Finalized in Java 22 (JEP 454) alongside the Foreign Linker API.
Strongly Encapsulate JDK Internals by Default (JEP 396)
The JDK’s internal APIs are now strongly encapsulated by default. The single flag –illegal-access=permit from previous releases still works but prints a warning. In Java 17 (JEP 403), even this escape hatch is removed. Libraries depending on sun.misc.Unsafe, com.sun.*, or jdk.internal.* must migrate before upgrading to Java 17.
ZGC: Concurrent Thread Processing (JEP 376)
ZGC now performs thread stack processing concurrently, reducing pause times further. Previously, thread stacks were processed during safepoints, contributing to pause duration. This change moves that work to concurrent threads.
Alpine Linux Port (JEP 386)
Java 16 builds are available for Alpine Linux using musl libc (not glibc). Relevant for minimal Docker images where Alpine’s small footprint is preferred.
Windows/AArch64 Port (JEP 388)
Native support for Windows on ARM64 devices (Surface Pro X, Snapdragon laptops).
Java 16 has been end-of-life since September 2021. The immediate upgrade is Java 17 LTS, which is the next release and inherits all Java 16 features.
Run jdeps –jdk-internals against your Java 16 application to identify dependencies on encapsulated APIs before upgrading.
Azul Platform Core provides TCK-certified builds of current LTS releases with extended support. A single subscription covers all supported versions from Java 6 through Java 26.
Contact us to learn more about our migration services, support, modernization services, and more!