Java 25 is here: Lean programmes, immutable values and long-term support
The OpenJDK finalises numerous JDK Enhancement Proposals, including for immutable values, flexible constructors and slim Java files.
(Image: Natalia Hanin / Shutterstock.com)
- Rainald Menge-Sonnentag
Oracle has officially announced the OpenJDK 25. The release offers a total of 18 JEPs (JDK Enhancement Proposals), many of which are marked as final.
The version number just happens to match the year: Since 2017, the OpenJDK project has been regularly released every six months. Next spring, the year and version number will match again, but Java 27 will be released in fall 2026.
Support for several years instead of six months
Many Java distributions are released every two years with long-term support (LTS), and Java 25 is intended for this. Oracle, for example, promises commercial support until at least September 2033, while Azul and other Java distributors offer similar support periods.
(Image:Â Oracle)
As the regular Java releases only receive support for six months, Java 25 replaces its predecessor.
Numerous innovations
In terms of the number of JEPs, the current release cannot keep up with its predecessor, which had 24 JEPs to match the version number, but Java 25, like previous LTS releases, offers a particularly large number of finished proposals: two-thirds of the JEPs are considered final.
(Image:Â Oracle)
Unchangeable: Stable Values and Scoped Values
The most important innovations in Java 25 include immutable values: stable values can be initialized exactly once and then only read. This enables the Java Virtual Machine (JVM) to make optimizations as it treats the content like constants.
(Image:Â Playful Creatives / Adobe Stock)
On October 14, everything at the betterCode() Java 2025 will revolve around the newly released Java 25. The online conference, organized by iX and dpunkt verlag, will cover the main innovations in six presentations. A keynote speech by Adam Bien on 30 years of Java will round off the day.
Scoped values are now also considered final. They offer thread-spanning, secure access to values in order to represent global states. Scoped values are also immutable and have a clearly defined lifetime.
More concise code
Some new features are intended to simplify the introduction to Java and make code easier to read. These include the Flexible Constructor Bodies, which allow (restricted) instructions before calling super, for example, to perform validations.
The JEP with the somewhat unwieldy name Compact Source Files & Instance-main enables leaner programs and can reduce boilerplate code.
Videos by heise
The JEP for Module Import Declarations also serves to reduce boilerplate code by making all exported packages of a module available with one declaration.
While the JEPs mentioned are final in Java 25, the Vector API remains a perennial favourite in the incubator – and is already in its tenth round. It is used to utilize current CPU architectures and instruction extensions such as Single Instruction Multiple Data (SIMD) and vector processors for vector calculation.
Before JEPs are considered final, they usually go through two stages in the further development of the OpenJDK: the incubator and the preview. The incubator is the experimental stage, which indicates that the functions are not yet fully developed, may change fundamentally and may not even be incorporated into the language. Not all innovations go through the incubator, but some go directly into the preview and others even into the language without a preview.
Preview features are fully specified and implemented, but may still undergo changes. Although there is no guarantee that they will actually end up in the language, this is very likely with preview features, as the past has shown.
In-depth insight into the new features in the Java blog on heise
If you want to read more than this brief overview of the most important features of Java 25: Two blog posts on the developer page at heise present all eighteen JEPs in the current JDK in detail:
- The most important new features of Java 25: Faster Startup with Stable Values
- The not-so-well-known new features of Java 25
The complete overview of the new features can also be found in the JDK 25 release notes.
(rme)