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
Jan 20, 2026
JDBC vs ORM vs jOOQ: Choose the Right Java Database Tool

Still unsure what is the difference between JPA, Hibernate, JDBC, or jOOQ and when to use which? This video clarifies the entire Java database access stack with real, production-oriented examples. We start at the foundation, which is JDBC, a low-level API every other tool eventually relies on for database communication. Then, we go through the ORM concept, JPA as a specification of ORM, Hibernate as the implementation and extension of JPA, and Blaze Persistence as a powerful upgrade to JPA Criteria API. From there, we take a different path with jOOQ: a database-first, SQL-centric approach that provides type-safe queries and catches many SQL errors at compile time instead of runtime. You’ll see when raw JDBC makes sense for small, focused services, when Hibernate fits CRUD-heavy domains, and when jOOQ excels at complex reporting and analytics. We discuss real performance pitfalls such as N+1 queries and lazy loading, and show practical combination strategies like “JPA for CRUD, jOOQ for reports.” The goal is to equip you with clarity so that you can make informed architectural decisions based on domain complexity, query patterns, and long-term maintainability.

Videos
card image
Jan 13, 2026
Hibernate: Ditch or Double Down? When ORM Isn't Enough

Every Java team debates Hibernate at some point: productivity champion or performance liability? Both are right. This video shows you when to rely on Hibernate's ORM magic and when to drop down to SQL. We walk through production scenarios: domain models with many-to-many relations where Hibernate excels, analytical reports with window functions where JDBC dominates, and hybrid architectures that use both in the same Spring Boot codebase. You'll see real code examples: the N+1 query trap that kills performance, complex window functions and anti-joins that Hibernate can't handle, equals/hashCode pitfalls with lazy loading, and practical two-level caching strategies. We also explore how Hibernate works under the hood—translating HQL to database-specific SQL dialects, managing sessions and transactions through JDBC, implementing JPA specifications. The strategic insight: modern applications need both ORM convenience for transactional business logic and SQL precision for data-intensive analytics. Use Hibernate for CRUD and relationship management. Use SQL where ORM abstractions leak or performance demands direct control.

Further watching

Videos
card image
Feb 6, 2026
Backend Developer Roadmap 2026: What You Need to Know

Backend complexity keeps growing, and frameworks can't keep up. In 2026, knowing React or Django isn't enough. You need fundamentals that hold up when systems break, traffic spikes, or your architecture gets rewritten for the third time.I've been building production systems for 15 years. This roadmap covers three areas that separate people who know frameworks from people who can actually architect backend systems: data, architecture, and infrastructure. This is about how to think, not what tools to install.

Videos
card image
Jan 29, 2026
JDBC Connection Pools in Microservices. Why They Break Down (and What to Do Instead)

In this livestream, Catherine is joined by Rogerio Robetti, the founder of Open J Proxy, to discuss why traditional JDBC connection pools break down when teams migrate to microservices, and what is a more efficient and reliable approach to organizing database access with microservice architecture.

Videos
card image
Jan 27, 2026
Sizing JDBC Connection Pools for Real Production Load

Many production outages start with connection pool exhaustion. Your app waits seconds for connections while queries take milliseconds; yet, most teams run default settings that collapse under load. This video shows how to configure connection pools that survive real production traffic: sizing based on database limits and thread counts, setting timeouts that prevent cascading failures, and implementing an open source database proxy Open J Proxy for centralized connection management with virtual connection handles, client-side load balancing, and slow query segregation. For senior Java developers, DevOps engineers, and architects who need database performance that holds under pressure.