Paul Krill
Editor at Large

JDK 25 kicks off with a stable values API

Stable values could speed up the startup of Java applications by breaking up the monolithic initialization of application state.

gear shift stick shift car automobile 5-speed
Credit: Peter Griffin

While Java Development Kit 25 is not set to arrive until September, the first feature already has been proposed for it โ€” a preview of a stable values API that promises to improve startup of Java applications.

Stable values are objects that hold immutable data. Because stable values are treated as constants by the JVM, they allow for the same performance optimizations that are enabled by declaring a field final. At the same time, they offer greater flexibility as to the timing of initialization. Thus they could be used to improve the startup of Java applications by breaking up the monolithic initialization of application state.

In addition to boosting application startup, the API would offer the following: decoupling creation of stable values from their initialization without big performance penalties, guaranteeing that stable values are initialized at most once, and enabling user code to enjoy constant-folding optimizations previously available only to JDK-internal code.

Prior to JDK 25, Oracle plans to release the 24-feature JDK 24 on March 18. JDK 25 will be the first long-term support release of standard Java since JDK 21, which arrived in September of 2023. Long-term support releases receive multiple years of support.

Other features that could make it into JDK 25 include features being previewed in JDK 24, such as a key derivation functions API, scoped values, structured concurrency, and flexible constructor bodies.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorldโ€™s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorldโ€™s audience of software developers and other information technology professionals. Paul has won a โ€œBest Technology News Coverageโ€ award from IDG.

More from this author