Although Java Development Kit (JDK) 25 isn’t scheduled for release until September, the development community is already getting a glimpse of what’s to come. The first proposed feature for JDK 25 is a preview of a stable values API, an addition that’s set to bring meaningful improvements to the Java platform. Most notably, it aims to enhance the startup performance of Java applications—a perennial challenge for developers working on large-scale systems or performance-sensitive tools.
At its core, the stable values API introduces a new way to handle immutable data within the Java Virtual Machine (JVM). Stable values are treated similarly to constants, allowing the JVM to apply performance optimizations typically reserved for final
fields. However, unlike standard constants, stable values can be initialized more flexibly, giving developers finer control over when and how application state is constructed. This means Java applications can start up more efficiently by avoiding the bottleneck of a large, single-phase initialization.
Beyond faster startup times, the stable values API brings additional benefits. It enables developers to separate the creation of stable values from their initialization, all without suffering the usual performance drawbacks. It also ensures that these values are initialized only once, providing consistency and thread safety. Most significantly, it opens the door for user-defined code to take advantage of constant-folding optimizations that were previously limited to internal parts of the JDK.
While the focus shifts to JDK 25, Oracle is still preparing to roll out JDK 24, which is slated for release on March 18. JDK 25 will mark the next long-term support (LTS) release after JDK 21, which debuted in September 2023. LTS versions are especially important for enterprise users, as they offer several years of maintenance and support, making them a stable choice for mission-critical applications. With the stable values API leading the charge, JDK 25 is shaping up to be a release worth watching.