Java 26 Preview: New JEPs and What They Mean for You

 

Transcript:

The next JDK 26 release includes 10 JEPs with new, improved, or removed features. Let’s look at all of them.

JEP 500 aims to prepare developers for the restriction of mutation of final fields in future releases. Final fields in Java represent an immutable state after they are assigned in the class initializer or in a constructor. They cannot be reassigned, and the expectation that a final field cannot be reassigned is important for reliability and even application performance. However, there are several APIs in Java that allow final fields to be reassigned at any time and by any code, and that undermines the whole point of final fields. With JEP 500, developers will receive warnings about the usage of deep reflection to mutate final fields. To avoid current warnings and future restrictions, developers will have to explicitly and selectively enable the mutation of final fields.

JEP 504 removes the Applet API. This includes the whole java.applet package, classes related to applets, and the remaining methods that reference the Applet API. Modern web browsers do not support applets anymore, so there is no reason to keep this API in the Java platform. Rest in peace, Applet API.

JEP 516 further improves the AOT cache introduced by Project Leyden in JDK 24. The AOT cache enables you to reduce startup and warm-up times of your applications by creating a cache with loaded and linked classes and method profiles. Previously, this cache was incompatible with ZGC, a low-latency garbage collector. Now it can be used with all garbage collectors, including ZGC, so you no longer have to choose between low latency and fast startup.

JEP 517 updates the Java HTTP Client API to support the HTTP/3 protocol. This protocol was standardized in 2022 and is supported by most modern browsers. Java applications using HTTP/3 can benefit from a more reliable transport and potentially faster handshakes. HTTP/2 remains the default version of the HTTP Client API in Java. Developers can use HTTP/3 by setting it explicitly as the version of the HTTP client object. If the target server does not support HTTP/3, the request will be transparently downgraded to HTTP/2 or even HTTP/1.

JEP 522 aims to improve the throughput of Java applications that use G1GC by reducing G1’s synchronization overhead. G1GC keeps track of object references so that it can update them efficiently after objects are moved. Some applications update references so frequently that G1GC has to use background optimizer threads. These threads must synchronize with application threads to avoid interfering with each other, and this coordination slows down G1 write barriers. This JEP addresses the problem by allowing application threads and G1 optimizer threads to work on separate copies of the tracking data and swap them when needed. This boosts throughput without changing how users interact with G1GC.

PEM encodings of cryptographic objects provide an API for encoding objects that represent certificates, cryptographic keys, and certificate revocation lists into the Privacy-Enhanced Mail format, or PEM, and for decoding them back into objects. JEP 524 revises this feature with several changes, including renamed classes and methods.

Structured concurrency was first introduced in Java 19. Its goal is to improve the experience of working with concurrency in Java and help developers write more readable, maintainable, and reliable code. The key idea is tying the lifetime of subtasks to a specific scope with clear entry and exit points, namely the task’s code block. This way, errors, cancellations, and observability follow a clear enforced parent-child structure. If one subtask fails, others are automatically cancelled. JEP 525 revises this feature with minor changes to gather additional feedback.

Lazy constants are objects holding immutable data. Like final fields, they are treated as constants by the JVM and allow for similar optimizations. Unlike final fields, they do not have to be initialized at the moment of creation. This allows applications to initialize incrementally and start faster. Lazy constants were first introduced in JDK 25 as stable values. JEP 526 gives them a new name and shifts their purpose toward higher-level use cases, removing low-level methods. Some features were also removed: lazy collection helpers are now exposed as List of Lazy or Map of Lazy, and computed null values are no longer allowed.

JEP 529 re-incubates the Vector API without significant changes. The Vector API was first introduced in JDK 16. It enables expressing vector computations that reliably compile to optimal vector instructions at runtime. This API will remain incubating until the necessary features of Project Valhalla are introduced as preview features. After that, the Vector API will be promoted to preview.

JEP 530 introduces two important changes to the feature that allows using primitive types in patterns, instanceof, and switch. First, the JEP tightens the rules the compiler uses to decide when a conversion is guaranteed not to lose information. The feature now clearly covers always-safe conversions such as byte to int or int to double, as well as constant values that are safe to convert, for example the literal 42 to int. The second change introduces stricter dominance checks for primitive types in switch expressions. The switch now rejects case labels that can never be reached because an earlier case already matches all possible values of a later case.

And these were the 10 JEPs of JDK 26. You can get early access builds of JDK 26 on the official OpenJDK website if you want to experiment with them. If this video was useful to you, don’t forget to like it, subscribe to the channel, and until next time.

Summary

This overview walks through the 10 JEPs included in JDK 26, highlighting changes that improve performance, security, maintainability, and developer experience. The release focuses on tightening Java’s safety guarantees, such as restricting mutation of final fields, improving garbage collection throughput, and refining language features like pattern matching and switch. Several APIs are revised or removed, including the Applet API and updates to structured concurrency, lazy constants, and cryptographic encodings. Platform-level improvements include better AOT caching, HTTP/3 support, and continued incubation of the Vector API. Overall, JDK 26 continues to modernize the platform while preparing developers for stricter and more predictable behavior in future releases.

About Catherine

Java developer passionate about Spring Boot. Writer. Developer Advocate at BellSoft

Social Media

Videos
card image
Mar 9, 2026
jOOQ Deep Dive: CTE, MULTISET, and SQL Pipelines

Some backend developers reach the point where the ORM stops being helpful. Complex joins, nested result graphs, or CTE pipelines quickly push frameworks like Hibernate to their limits. And when that happens, teams often end up writing fragile raw SQL strings or fighting performance issues like the classic N+1 query problem. In this video, we build a healthcare scheduling application NeonCare using jOOQ, Spring Boot 4, and PostgreSQL, and show how to write production-grade SQL directly in Java while keeping full compile-time type safety.

Videos
card image
Feb 27, 2026
Spring Developer Roadmap 2026: What You Need to Know

Spring Boot is powerful. But knowing the framework isn’t the same as understanding backend engineering. In this video, I walk through the roadmap I believe matters for a Spring developer in 2026. We start with data. That means real SQL — CTEs, window functions, normalization trade-offs — and understanding what ACID and BASE actually imply for system guarantees. Spring Data JPA is useful, but you still need to know what happens underneath. Then architecture: microservices vs modular monolith, serverless, CQRS, and when HTTP, gRPC, Kafka, or WebSockets make sense. Not as buzzwords — but as design choices with trade-offs. Security and infrastructure follow: OWASP Top 10, AuthN vs AuthZ, encryption in transit and at rest, Docker, Kubernetes, Infrastructure as Code, and observability with Micrometer, OpenTelemetry, and Grafana. This roadmap isn’t about mastering every tool. It’s about knowing what affects reliability in production.

Further watching

Videos
card image
Apr 2, 2026
Java Memory Options You Need in Production

JVM memory tuning can be tricky. Teams increase -Xmx and assume the problem is solved. Then the app still hits OOM. Because maximum heap size is not the only thing that affects memory footprint. The JVM uses RAM for much more than heap: metaspace, thread stacks, JIT/code cache, direct buffers, and native allocations. That’s why your process can run out of memory while heap still looks “fine”. In this video, we break down how JVM memory actually works and how to control it with a minimal, production-safe set of flags. We cover heap sizing (-Xms, -Xmx), dynamic resizing, direct memory (-XX:MaxDirectMemorySize), and total RAM limits (-XX:MaxRAMPercentage) — especially in containerized environments like Docker and Kubernetes. We also explain GC choices such as G1, ZGC, and Shenandoah, when defaults are enough, and why GC logging (-Xlog:gc*) is mandatory before tuning. Finally, we show how to diagnose failures with heap dumps and OOM hooks. This is not about adding more flags. It’s about understanding what actually consumes memory — and making decisions you can justify in production.

Videos
card image
Mar 26, 2026
Java Developer Roadmap 2026: From Basics to Production

Most Java roadmaps teach tools. This one teaches order — the only thing that actually gets you to production. You don’t need to learn everything. You need to learn the right things, in the right sequence. In this video, we break down a practical Java developer roadmap for 2026 — from syntax and OOP to Spring, databases, testing, and deployment. Structured into 8 levels, it shows how real engineers grow from fundamentals to production-ready systems. We cover what to learn and what to ignore: core Java, collections, streams, build tools, Git, SQL and JDBC before Hibernate, the Spring ecosystem, testing with JUnit, and deployment with Docker and CI/CD. You’ll also understand why most developers get stuck — jumping into frameworks too early, skipping SQL, or treating tools as knowledge. This roadmap gives you a clear path into real-world Java development — with priorities, trade-offs, and production context.

Videos
card image
Mar 19, 2026
TOP-5 Lightweight Linux Distributions for Containers

In this video, we compare five lightweight Linux distributions commonly used as base images: Alpine, Alpaquita, Chiseled Ubuntu, RHEL UBI Micro, and Wolfi. There are no rankings or recommendations — just a structured look at how these distros differ so you can evaluate them in your own context.