Java 24, set to be released on March 18, 2025, is a short-term JDK release that brings a host of new features and improvements to the Java ecosystem. This article delves into the key aspects of Java 24, including its experimental, incubator, preview, and permanent features, providing developers with a thorough understanding of what to expect from this latest release.
Understanding Java 24
Java 24, also known as JDK 24, is a short-term release that will receive premier support for six months. It serves as a stepping stone towards Java 25, the next long-term support (LTS) version scheduled for release in September 2025.
Key Features:
- 2 Experimental JEPs
- 1 Incubator JEP
- 7 Preview JEPs
- 14 Permanent JEPs
Java Enhancement Proposals (JEPs)
JEPs are the mechanism through which new Java features progress from initial introduction to permanent inclusion in the JDK. They are categorized into four main types:
- Experimental JEPs
- Incubator JEPs
- Preview JEPs
- Permanent JEPs
Experimental JEPs in Java 24
Java 24 introduces two experimental JEPs:
- JEP 404: Generational Shenendoah
- Explores a generational mode for the Shenendoah garbage collector
- Aims to make generational mode the default in future releases
- JEP 450: Compact Object Headers
- Reduces object header size from 96-128 bits to 64 bits on 64-bit architectures
- Benefits include reduced heap size, improved deployment density, and increased data locality
Incubator JEP in Java 24
Java 24 features one incubator JEP:
JEP 489: Vector API (ninth incubator)
- Continues the development of the Vector API, first introduced in Java 16
- Introduces new variations of cross-lane operations and improvements to arithmetic integral lanewise operations
Preview JEPs in Java 24
Java 24 includes seven preview features:
- JEP 478: Key Derivation Function API
- JEP 487: Scoped Values (Fourth Preview)
- JEP 488: Primitive Types in Patterns, instanceof, and switch (Second Preview)
- JEP 492: Flexible Constructor Bodies (Third Preview)
- JEP 494: Module Import Declarations (Second Preview)
- JEP 495: Simple Source Files and Instance Main Methods (Fourth Preview)
- JEP 499: Structured Concurrency (Fourth Preview)
These preview features introduce new APIs, enhance pattern matching, simplify modular programming, and improve concurrency handling.
Permanent JEPs in Java 24
Java 24 solidifies 14 JEPs as permanent features, including:
- Preparation for JNI use restriction
- Improvements to garbage collection
- Removal of the Windows 32-bit x86 Port
- Introduction of the Class-File API
- Implementation of quantum-resistant cryptographic algorithms
Looking Ahead: Java 25 and Beyond
Java 24 paves the way for Java 25, the next LTS version. This release cycle aligns with Oracle’s commitment to providing LTS versions every two years, an acceleration from the previous three-year cadence.
Conclusion
While Java 24 is a short-term release, it introduces significant features and improvements that will shape the future of Java development. Developers should familiarize themselves with these changes, as many will likely become standard in Java 25 and beyond.
Read more such articles from our Newsletter here.