Java 26 new features: streamlined APIs, improved performance and modernization with HTTP/3

Java 26 has been released on March 17, 2026, six months after Java 25, the latest LTS (Long-Term Support) version. This release includes 10 JEPs (Java Enhancement Proposals) that impact both the core foundations of the language and its performance.

The most notable updates include a stronger reflection API, the definitive removal of the Applet API, performance improvements, and support for HTTP/3.

Explore our analysis.

Java 26: New Features

JEP 500: Prepare to Make Final Mean Final

Java 26 closes a loophole that has existed since the early days of the language. In previous versions, a field declared final, meaning it should not be modified after initialization, could still be modified after initialization.

The reflection mechanism allowed developers to bypass this restriction through the java.lang.reflect.Field class:

class C {
    final String finalField;
    C() { finalField = "Hello"; }
}

java.lang.reflect.Field f = C.class.getDeclaredField("finalField");
f.setAccessible(true);

C obj = new C();
System.out.println(obj.finalField);  // Prints "Hello"

f.set(obj, "Goodbye");
System.out.println(obj.finalField);  // Prints "Goodbye"

For now, this JEP introduces a runtime warning to prepare developers for a future Exception that will prevent such code from running.

WARNING: Final field x in class [...].C has been mutated reflectively by class [...].FinalMain in unnamed module @7adf9f5f
WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning
WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled

JEP 504: Remove the Applet API

Java 26 definitively ends an era with the removal of the Applet API, which once allowed Java code to run inside web browsers.

This technology, once widely used, has been deprecated since Java 9 and has been marked for removal since Java 17.

Today, no modern browser supports this technology, and this JEP aligns with the broader goal of cleaning up legacy APIs in the language.

The removed classes include:

  • java.applet.Applet
  • java.applet.AppletContext
  • java.applet.AppletStub
  • java.applet.AudioClip
  • java.beans.AppletInitializer
  • javax.swing.JApplet

JEP 516: Ahead-Of-Time Object Caching with Any GC

Java 26 improves AOT (Ahead-Of-Time) object caching by making it compatible with any Garbage Collector.

Cached objects can now be loaded sequentially in a generic, garbage-collector-agnostic format, maximizing compatibility and performance.

Previously, cached objects were stored with a memory address (for example 0x4002045278).
The new generic format stores objects using a logical index (for example 5), which is later resolved into a memory address when the cache is loaded.

The JVM (Java Virtual Machine) chooses the appropriate strategy depending on the situation (warm start, cold start, etc.) to optimize performance.

JEP 517: HTTP/3 for the HTTP Client API

Java 26 adds compatibility with HTTP/3, the latest evolution of the HTTP protocol.

HTTP/3 uses QUIC, which provides:

  • Lower latency
  • Better performance
  • Improved security (encrypted connection by default)

The traditional Java HttpClient did not support this protocol. With this release, it becomes possible to specify HTTP/3 in the client builder or in an individual request.

var client = HttpClient.newBuilder()
       .version(HttpClient.Version.HTTP_3)
        .build();
var request = HttpRequest.newBuilder(URI.create("https://www.sqli.com/"))
        .version(HttpClient.Version.HTTP_3)
        .GET().build();

JEP 522: G1 GC – Improve Throughput by Reducing Synchronization

Java 26 also introduces improvements to the G1 garbage collector.

The Garbage-First (G1) collector, default in the HotSpot JVM, is designed to balance latency and throughput. However, this balance sometimes impacts application performance compared with collectors like Parallel or Serial.

This update reduces synchronization between application threads and garbage collector threads by simplifying write operations in the Card Table, an internal GC data structure used to track cross-generation object references.

As a result, latency is reduced and throughput is increased for the G1 garbage collector.

Java 26: Preview and Incubating Features

Java 26 also includes features that are not yet finalized and may evolve based on community feedback.

They are typically classified into three maturity levels:

  • 🟢 Stable: Few or no changes; the feature is close to completion
  • 🟡 Actively evolving: Significant changes are still occurring
  • 🔴 Blocked: Waiting for an external prerequisite

To enable these features, programs must be compiled with specific options (for example --enable-preview).

Let’s review them.

JEP 524: PEM Encodings of Cryptographic Objects

🟡 Actively evolving

Java 26 presents this JEP in preview for the second time, after a first preview in Java 25.

Its goal is to provide a concise API for handling cryptographic keys and certificates in PEM format (Privacy-Enhanced Electronic Mail), a widely used file format.

Feedback from the previous preview led to several improvements:

  • Support for additional cryptographic object types (such as X.509 certificates)
  • Improved exception handling and naming of classes and methods
  • Introduction of new interfaces

JEP 525: Structured Concurrency

🟢 Stable

Concurrency management is a recurring challenge in programming, and Java has long provided tools for handling it (threads, executors, etc.).

This JEP has been available in preview since Java 21, after first being incubated in Java 19.

It is presented again in Java 26 preview (for the sixth time). The unusually high number of iterations reflects the complexity of the topic.

The goal is to provide APIs that:

  • Structure concurrency
  • Reduce risks associated with concurrent programming
  • Improve observability

This version introduces few changes, mainly some new functions and improvements to the Joiner interface.

JEP 526: Lazy Constants

🟡 Actively evolving

Java 26 presents this JEP in preview for the second time, following its initial preview in Java 25.

The goal is to introduce lazy constants: constants similar to final fields but with greater flexibility regarding when they are initialized.

This allows constants to be initialized on demand rather than at startup, improving performance.

This second iteration introduces significant changes:

  • Reorientation of the API toward a higher-level interface with clearer intent
  • Renaming the API from StableValue to LazyConstant
  • Relocating some APIs into more appropriate classes for better code organization
    (for example, methods related to Map moved into java.util.Map)

JEP 529: Vector API

🔴 Blocked

This JEP has been in incubation since Java 16 and appears here for the 11th time.

Its objective is to provide an API for vector operations and improve their performance across different CPU architectures.

No significant changes have been made since the previous iteration.

The feature will remain in incubation until Project Valhalla officially enters preview, allowing the Vector API to leverage its capabilities.

JEP 530: Primitive Types in Patterns, instanceof, and switch

🟢 Stable

Java 26 presents this JEP in preview for the fourth time, after its first preview in Java 23.

This JEP enables the use of primitive types in patterns, as well as in instanceof expressions and switch statements.

While the feature has not evolved in the last two iterations, this version introduces two improvements:

  • Pattern matches involving primitive types now verify that the conversion occurs without data loss. For example, an int pattern applied to a long value is only valid if the value actually fits within an int.
  • More advanced compile-time checks in switch pattern matching to detect certain programming errors earlier.

Conclusion

Java 26 introduces several interesting developments, including:

  • Stronger language semantics (JEP 500 reinforcing the meaning of final)
  • API cleanup (removal of the Applet API)
  • Performance improvements (JEP 516 and JEP 522)
  • Modernization with HTTP/3 support

Among preview features, Structured Concurrency and Primitive Types in Patterns appear close to finalization, while Lazy Constants continue to evolve actively.

As often with releases between LTS versions, these changes aim to strengthen the language and prepare for future major evolutions, such as Project Valhalla.

Learn more

OpenJDK – JDK 26

OpenJDK – Projet Valhalla

Want to know more?