OpenJDK 26, an interim release of OpenJDK, was published in the updates pocket of Ubuntu 26.04 and will be supported until its end of life in September 2026.
OpenJDK 26 introduces the following new features:
-
JEP 500: Prepare to Make Final Mean Final
Issues warnings when code modifies final fields using reflection outside of their constructors or initializers. A future release will disallow final field mutation by default.java.lang.reflect.Field f = C.class.getDeclaredField("x"); f.setAccessible(true); // Make C's final field mutableA new option is available to disable these warnings (and prevent future exceptions):
--enable-final-field-mutation=ALL-UNNAMED -
JEP 504: Remove the Applet API
Completely removes the deprecated Applet API, whicWah has been obsolete since web browsers dropped support for Java plugins. -
JEP 516: Ahead-of-Time Object Caching with Any GC
Previously, JEP 483 (Ahead-of-Time Class Loading & Linking) introduced an ahead-of-time cache that stores internal object representations to speed up startup times. However, the cache format was garbage-collector-specific and did not support ZGC. This JEP delivers a garbage-collector-agnostic cache format, allowing the ahead-of-time cache to be used with any GC, including ZGC. -
JEP 517: HTTP/3 for the HTTP Client API
Updates the HTTP Client API to support the HTTP/3 protocol, allowing libraries and applications to interact with HTTP/3 servers with minimal code changes. -
JEP 522: G1 GC: Improve Throughput by Reducing Synchronization
Optimizes the G1 Garbage Collector by reducing thread synchronization overhead, leading to better overall throughput and application performance. Applications may see throughput gains in the range of 5–15%.
In addition, this release includes previews and incubator versions of several other features:
-
JEP 524: PEM Encodings of Cryptographic Objects (Second Preview)
Provides an API for encoding objects that represent cryptographic keys, certificates, and certificate revocation lists into the widely used Privacy-Enhanced Mail (PEM) transport format, and for decoding them back into objects. This is a work in progress, with the Third Preview available in OpenJDK 27. -
JEP 525: Structured Concurrency (Sixth Preview)
Treats multiple related tasks running in different threads as a single unit of work, simplifying multithreaded programming and error handling. This is a work in progress, with the Seventh Preview available in OpenJDK 27. -
JEP 526: Lazy Constants (Second Preview)
Introduces support for the lazy initialization of final fields. This feature is a work in progress, with the Third Preview available in OpenJDK 27. -
JEP 529: Vector API (Eleventh Incubator)
Provides an API to express vector computations that reliably compile at runtime to optimal vector instructions on supported CPU architectures. This is one of Java’s longest-running incubator features, first introduced in Java 16 (JEP 338). It is expected to transition to a preview feature after the integration of Project Valhalla. -
JEP 530: Primitive Types in Patterns, instanceof, and switch (Fourth Preview)
Enhances pattern matching to fully support all primitive types, reducing boilerplate code and making conditional logic cleaner and safer. This allows developers to match on primitive types directly in switch statements and expressions, replacing complexif-elsestructures. For example:switch (x.getYearlyFlights()) { case 0 -> ...; case 1 -> ...; case 2 -> issueDiscount(); case int i when i >= 100 -> issueGoldCard(); case int i -> ... appropriate action when i > 2 && i < 100 ... }
You can read more about the new features here.