Since 2018, the Java platform has maintained a consistent release schedule, delivering a new version every six months. True to this pattern, JDK 24 has now arrived, bringing with it an impressive 24 JDK Enhancement Proposals (JEPs). This marks the largest set of new features introduced in any release since the adoption of the time-based release cycle. However, not all 24 features are immediately available to developers, as some are preview features, incubator modules, or experimental. This article focuses on the most impactful additions for Java developers and those deploying Java applications.
Among the most significant new features in JDK 24 is JEP 483, which is part of Project Leyden and introduces Ahead-of-Time (AOT) Class Loading and Linking. The overarching aim of Project Leyden is to reduce Java application startup time. While Java’s traditional Just-in-Time (JIT) compilation offers excellent scalability and platform independence, it comes at the cost of slower startup times. JEP 483 addresses this by making application classes available immediately in a loaded and linked state as soon as the JVM starts. This eliminates the need for repetitive class loading, verification, and linking, which traditionally slows down application startup, thus improving performance.
Another valuable addition in JDK 24 is JEP 485, Stream Gatherers. This minor update to the Stream API introduces a new interface — the Gatherer — which allows developers to define custom intermediate operations in streams. While the Stream API, introduced in JDK 8, revolutionized Java programming by enabling functional-style operations on collections, developers were previously limited to a predefined set of intermediate operations. With Stream Gatherers, developers now have more flexibility, allowing them to implement their own custom operations for stream processing, enhancing the overall flexibility and expressiveness of Java’s functional programming capabilities.
These updates, along with the many other enhancements in JDK 24, reflect the ongoing evolution of Java as a modern and efficient language for both new and existing applications. Whether improving performance through AOT class loading or expanding the functionality of the Stream API, JDK 24 promises to make Java development more streamlined, efficient, and capable of handling the demands of contemporary software projects.