Released on March 17, 2026, JDK 26 is the six-month feature release following Java 25 (LTS). Bringing 10 official JDK Enhancement Proposals (JEPs) along with critical HotSpot runtime optimizations, JDK 26 introduces modern networking protocols, tightens language safety, optimizes garbage collection throughput, and refines concurrency patterns.
Here is a comprehensive breakdown of everything included in Java 26.
At a Glance: The 10 JEPs of JDK 26
| JEP | Category | Status | Summary |
| 500 | Core Libraries | Permanent | Prepare to Make Final Mean Final (Restricts reflective mutation of final fields) |
| 504 | Client / Core | Permanent | Remove the Applet API (Complete removal of java.applet.*) |
| 516 | HotSpot / Runtime | Permanent | Ahead-of-Time Object Caching with Any GC (Expands AOT caching to ZGC and others) |
| 517 | Core Libraries | Permanent | HTTP/3 for the HTTP Client API (Adds native HTTP/3 and QUIC support) |
| 522 | HotSpot / GC | Permanent | G1 GC: Improve Throughput by Reducing Synchronization (Streamlined write barriers) |
| 524 | Security | 2nd Preview | PEM Encodings of Cryptographic Objects (Standardized API for PEM parsing/encoding) |
| 525 | Concurrency | 6th Preview | Structured Concurrency (Task coordination with new onTimeout() joins) |
| 526 | Core Libraries | 2nd Preview | Lazy Constants (Formerly Stable Values; high-efficiency deferred evaluation) |
| 529 | Performance | 11th Incubator | Vector API (Expressing vector computations across modern SIMD architectures) |
| 530 | Language Specification | 4th Preview | Primitive Types in Patterns, instanceof, and switch |
1. Network Modernization: HTTP/3 Support
JEP 517: HTTP/3 for the HTTP Client API
Java’s standard java.net.http.HttpClient (introduced in Java 11) previously supported HTTP/1.1 and HTTP/2 over TCP. JDK 26 introduces native support for HTTP/3 over QUIC (UDP-based).
HTTP/3 solves head-of-line blocking at the transport layer, accelerates connection handshakes (often 0-RTT), and offers seamless connection migration between IP networks.
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Http3Demo {
public static void main(String[] args) throws Exception {
// Configure the client to negotiate HTTP/3
HttpClient client = HttpClient.newBuilder()
.version(HttpClient.Version.HTTP_3)
.build();
HttpRequest request = HttpRequest.newBuilder(URI.create("https://example.com/api"))
.version(HttpClient.Version.HTTP_3)
.GET()
.build();
HttpResponse<String> response = client.send(
request,
HttpResponse.BodyHandlers.ofString()
);
System.out.println("Protocol Version: " + response.version());
System.out.println("Response Status: " + response.statusCode());
}
}
If an endpoint does not support HTTP/3 via QUIC, the client seamlessly falls back to HTTP/2 or HTTP/1.1 via standard ALPN negotiation.
2. Language Semantics & Pattern Matching
JEP 500: Prepare to Make Final Mean Final
Historically, Java developers could use reflection to bypass the final keyword and mutate fields at runtime via Field.setAccessible(true):
class Config {
final String apiKey = "INITIAL_KEY";
}
// In previous versions:
Field field = Config.class.getDeclaredField("apiKey");
field.setAccessible(true);
field.set(configInstance, "MUTATED_KEY"); // Allowed, breaking JVM assumptions
JEP 500 begins the process of eliminating this loophole. In JDK 26:
- Reflective mutation of
finalfields now issues a runtime warning by default. - Developers can configure the JVM flag
--enable-final-field-mutation=ALL-UNNAMEDto suppress warnings during transitions. - In future releases, mutating
finalfields will throw an exception.
This change allows the HotSpot JIT compiler to perform more aggressive optimizations (such as constant folding and field inlining) with total confidence.
JEP 530: Primitive Types in Patterns, instanceof, and switch (4th Preview)
Java continues unifying primitive types and reference types under Project Amber. JEP 530 allows primitive types (int, byte, float, double, etc.) in pattern matching contexts:
void evaluate(Object obj) {
switch (obj) {
case byte b -> System.out.println("Byte value: " + b);
case int i -> System.out.println("Integer value: " + i);
case long l -> System.out.println("Long integer: " + l);
case double d -> System.out.println("Double float: " + d);
default -> System.out.println("Non-numeric object: " + obj);
}
}
What’s new in the 4th Preview:
- Refined unconditional exactness: Stricter mathematical definitions to guarantee safe conversions without unexpected loss of precision.
- Tighter dominance checks: Enhanced compile-time validation preventing unreachable pattern branches.
3. High-Performance Runtime & Memory Improvements
JEP 516: Ahead-of-Time (AOT) Object Caching with Any GC
Under Project Leyden, AOT Object Caching pre-compiles and pre-initializes core classes and application states to slash startup and warmup times. Previously, cached objects had to be tailored to specific garbage collectors.
JDK 26 decouples object caching from memory layout:
- Cached objects are now stored in a GC-agnostic, logical index format rather than physical addresses.
- Applications using ZGC (Generational ZGC) can now fully leverage Leyden’s AOT object cache without being forced back to Serial or G1 GC during cache preparation.
JEP 522: G1 GC: Improve Throughput by Reducing Synchronization
The Garbage-First (G1) collector achieves high responsiveness by tracking cross-region pointer modifications using write barriers.
In JDK 26, the synchronization overhead between application threads and G1 concurrent refining threads has been significantly re-engineered:
- The x86-64 write barrier instruction count drops from approximately ~50 instructions down to ~12.
- Benchmarks show 5% to 15% throughput improvements in reference-heavy enterprise applications without sacrificing latency.
Additional HotSpot Optimizations in JDK 26
- Smaller Default Heap (
MinHeapSize): For applications running with unspecified initial heap sizes, the JVM now starts atMinHeapSizerather than relying onInitialRAMPercentage, decreasing container memory footprints and cold-start latency. - Record
hashCode()Performance: Auto-generated hash calculations forrecordclasses are now vectorized and compiled with intrinsics, accelerating hashing lookups in hash-maps and sets. - MemorySegment to String Zero-Copy: Memory-segment conversions to
java.lang.Stringeliminate redundant intermediate allocations. - C2 Compiler Scalability: HotSpot’s C2 JIT compiler can now compile methods containing unusually large parameter lists that were previously kept in the slower interpreter or C1 tier.
4. Modernized Libraries & Security
JEP 526: Lazy Constants (2nd Preview)
Formerly known as Stable Values in JDK 25, JEP 526 provides an official, thread-safe, high-performance mechanism for deferred initialization:
import java.lang.LazyConstant;
public class DatabaseService {
// Computes value only once on demand, then treats it like a compile-time constant
private static final LazyConstant<ConnectionPool> DB_POOL =
LazyConstant.of(() -> initPool());
public static ConnectionPool getPool() {
return DB_POOL.get();
}
private static ConnectionPool initPool() {
return new ConnectionPool("jdbc:postgresql://localhost:5432/main");
}
}
Unlike double-checked locking or manual volatile checks, LazyConstant:
- Guarantees thread-safe single initialization.
- Disallows
nullvalues for consistent semantics. - Allows the JIT compiler to optimize subsequent reads with constant-folding performance equivalent to a
static finalfield.
JEP 524: PEM Encodings of Cryptographic Objects (2nd Preview)
Reading and writing PEM-formatted keys (.pem, .crt, .key) typically required external dependencies like BouncyCastle. JEP 524 standardizes native PEM parsing and encoding.
Updates in JDK 26:
- The class name is simplified from
PEMRecordtoPEM. - Built-in support for encrypting and decrypting
KeyPairandPKCS8EncodedKeySpecobjects directly withinPEMEncoderandPEMDecoder.
5. Concurrency & Vector Computing
JEP 525: Structured Concurrency (6th Preview)
Structured Concurrency treats multi-threaded subtasks as a single unit of work, significantly simplifying error propagation and cancellation:
import java.util.concurrent.StructuredTaskScope;
Response handleRequest() throws Exception {
try (var scope = new StructuredTaskScope.ShutdownOnFailure()) {
StructuredTaskScope.Subtask<UserData> userSubtask =
scope.fork(() -> fetchUserData());
StructuredTaskScope.Subtask<OrderHistory> orderSubtask =
scope.fork(() -> fetchOrderHistory());
scope.join(); // Synchronize both tasks
scope.throwIfFailed(); // Propagate exceptions
return new Response(userSubtask.get(), orderSubtask.get());
}
}
In JDK 26, the StructuredTaskScope.Joiner interface adds an onTimeout() callback, making it simple to execute fallback logic or partial aggregation when deadlines elapse.
JEP 529: Vector API (11th Incubator)
The Vector API continues in incubator status as it coordinates with Project Valhalla. It enables developers to express SIMD (Single Instruction Multiple Data) calculations directly in Java:
static final VectorSpecies<Float> SPECIES = FloatVector.SPECIES_PREFERRED;
void vectorAdd(float[] a, float[] b, float[] c) {
int i = 0;
int upperBound = SPECIES.loopBound(a.length);
for (; i < upperBound; i += SPECIES.length()) {
var va = FloatVector.fromArray(SPECIES, a, i);
var vb = FloatVector.fromArray(SPECIES, b, i);
var vc = va.add(vb);
vc.intoArray(c, i);
}
for (; i < a.length; i++) {
c[i] = a[i] + b[i]; // Tail clean-up
}
}
The Vector API remains in incubation until Valhalla value objects become finalized, which will allow vector primitives to be lightweight, identity-free values on the JVM stack.
6. End of an Era: Complete Removal of the Applet API
JEP 504: Remove the Applet API
First deprecated in Java 9 and marked for removal in Java 17, the Applet API has been completely excised from the JDK in version 26.
Classes removed include:
java.applet.Appletjava.applet.AppletStubjava.applet.AppletContextjava.applet.AudioClipjavax.swing.JAppletjava.beans.AppletInitializer
Legacy code targeting applets must migrate to modern desktop architectures (such as JavaFX) or web frontends.
Summary & Upgrade Guidance
JDK 26 delivers targeted refinements across developer productivity, security, and performance:
- For Web & Cloud Services: Native HTTP/3 and AOT Object Caching for ZGC provide faster responses and lower cold-start latency.
- For High-Throughput Systems: The G1 write-barrier overhaul and Lazy Constants optimize execution paths and reduce memory synchronization bottlenecks.
- For Clean Code & Security: PEM decoding/encoding and the gradual enforcement of immutable
finalfields reduce reliance on external libraries and brittle reflection hacks.
Discover more from GhostProgrammer - Jeff Miller
Subscribe to get the latest posts sent to your email.
