Significant Changes in JDK 26 Release
See JDK 26 Release Notes for descriptions of the new features and enhancements, and API specification in JDK 26.
Java SE 26 and JDK 26 introduce a range of updates across the language, security libraries, and performance improvements.
Language Preview Features
- Pattern Matching is enhanced by allowing primitive types in all pattern contexts. The
instanceofoperator andswitchexpressions and statements are extended to work with all primitive types.First previewed in Java SE 23 and previewed again in Java SE 24 and Java SE 25, this feature is re-previewed for this release.
See JEP 530: Primitive Types in Patterns, instanceof, and switch (Fourth Preview) and the following sections in Java Platform, Standard Edition Java Language Updates:
Library Improvements, Previews, and Incubator
- The HTTP Client API now supports HTTP/3 protocol, enabling libraries and applications to interact with HTTP/3 servers with minimal code changes.
- Lazy constants API are treated as constants by the JVM, enabling the same performance optimizations that are enabled by declaring a field
final. Compared tofinalfields, lazy constants offer greater flexibility as to the timing of their initialization.First previewed in JDK 25 as JEP 502, this feature is revised and re-previewed in this release.
See JEP 526: Lazy Constants (Second Preview), and the section
LazyConstantin the Java API Specification, and the section Lazy Constants in Java Platform, Standard Edition Core Libraries. - Structured Concurrency is an API that simplifies concurrent programming. It treats groups of related tasks running in different threads as a single unit of work, thereby streamlining error handling and cancellation, improving reliability, and enhancing observability.
See JEP 525: Structured Concurrency (Sixth Preview) and Structured Concurrency in Java Platform, Standard Edition Core Libraries.
- The Vector API expresses vector computations that reliably compile at runtime to optimal vector instructions on supported CPU architectures, thus achieving performance superior to equivalent scalar computations.
See JEP 529: Vector API (Eleventh Incubator) and JEP 11: Incubator Modules.
Security Libraries- An API has been introduced 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 from that format back into objects.
See JEP 524: PEM Encodings of Cryptographic Objects (Second Preview) and The DEREncodable Interface in Java Platform, Standard Edition Security Developer's Guide.
- An API has been introduced 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 from that format back into objects.
Performance and Runtime Improvements
- Application throughput when using the G1 garbage collector is increased by reducing the amount of synchronization required between application threads and GC threads.
See JEP 522: G1 GC: Improve Throughput by Reducing Synchronization.
- Ahead-of-Time (AOT) cache is updated to work with any garbage collector (including low-latency ZGC) by loading cached Java objects sequentially from a neutral, GC-agnostic format instead of memory-mapping them in a GC-specific format, thus improving JVM startup and warmup performance.
First introduced in JEP 483: Ahead-of-Time Class Loading and Linking, this enhancement brings new AOT-related optimizations to the HotSpot JVM.
Removals and Warnings for Future Changes
- JDK 26 issues warnings about uses of deep reflection to mutate
finalfields. These warnings aim to prepare developers for a future release that ensures integrity by default by restrictingfinalfield mutation through deep reflection, which makes Java programs safer and potentially faster. You can use the command-line options--enable-final-field-mutationand--illegal-final-field-mutationto selectively enable the ability to mutatefinalfields through deep reflection where essential, thereby avoiding warnings and future restrictions. See JEP 500: Prepare to Make Final Mean Final and Preparing for final Field Mutation Restrictions. - The Applet API, deprecated for removal in JDK 17, has been removed.