DEV Community

Abhishek Dave for SSOJet

Posted on • Originally published at blog.mojoauth.com

Java 24 Launches with JEP 483 for Enhanced Application Performance and Future Plans for 2025

Originally published at https://blog.mojoauth.com/news-2025-03-java-24-leyden-ships

In Java 24, Project Leyden introduces JEP 483, "Ahead-of-Time Class Loading & Linking," improving application startup times by up to 40% without requiring code changes. This enhancement is particularly valuable for applications like Spring PetClinic. The process involves a training run to create a cache file that is bundled with the application. GraalVM Native Image and Coordinated Restore at Checkpoint (CRaC) can achieve even faster startup times of 95-99%, although they come with additional constraints.

JEP 483 builds on Java's Class-Data Sharing (CDS) mechanism. At startup, the JVM processes the same classes, storing the results in a read-only cache file. This AOT cache is created through a training run that records the configuration, which can then be utilized to expedite application launches.

The required commands for implementing the AOT cache are as follows:

java ‑XX:AOTMode=record ‑XX:AOTConfiguration=app.aotconf ‑cp JavacBenchApp.jar JavacBenchApp 50
java ‑XX:AOTMode=create ‑XX:AOTConfiguration=app.aotconf ‑XX:AOTCache=app.aot ‑cp JavacBenchApp.jar
Enter fullscreen mode Exit fullscreen mode

The resulting AOT cache can be executed with:

java ‑XX:AOTCache=app.aot ‑cp JavacBenchApp.jar JavacBenchApp 50
Enter fullscreen mode Exit fullscreen mode

The impact of the AOT cache is more pronounced with applications that load many classes, which is significant for frameworks like Spring Boot.

For more technical details, read about JEP 483 and learn about GraalVM Native Image for further optimizations.

Java 24 Features Overview

Java 24 includes 24 JEPs, showcasing a range of new features aimed at enhancing performance, security, and developer experience. Notable improvements include compact object headers and garbage collection optimizations. The new JEPs include:

  • JEP 404: Generational Shenandoah - An experimental garbage collector designed to minimize pause times. More details can be found in JEP 404.
  • JEP 450: Compact Object Headers - This feature reduces memory overhead for Java objects. More information is available in JEP 450.
  • JEP 483: Ahead-of-Time Class Loading & Linking - Discussed above, this feature enhances startup times significantly.

Security enhancements include:

  • JEP 478: Key Derivation Function API - A preview feature that addresses vulnerabilities in traditional cryptographic algorithms with the rise of quantum computing. More can be found in JEP 478.
  • JEP 496: Quantum-Resistant Module-Lattice-Based Key Encapsulation Mechanism - This JEP introduces a quantum-resistant algorithm for secure key encapsulation. More information is available in JEP 496.

Framework Support for JEP 483

Responses from various framework teams indicate strong support for JEP 483. The Helidon team demonstrated significant speed-ups with JEP 483 compared to GraalVM Native Image and CRaC:

Application Type JEP 483 Speed-Up CRaC Speed-Up GraalVM Native Image Speed-Up
Helidon SE 67% 95% 98%
Helidon MP 62% 98% 98%

Quarkus also highlighted their integration with JEP 483, emphasizing efforts to streamline the training run process, particularly in containerized environments. They have implemented features to package applications with the AOT cache.

Sebastian Deleuze from Spring expressed excitement about the benefits that JEP 483 will bring to the Spring ecosystem, with existing support for CDS being enhanced by the introduction of the AOT cache.

For further details, read the Quarkus blog and the Spring Framework insights.

Java's Future Directions

Java's evolution includes several ambitious projects aimed at enhancing the language's capabilities. Notable projects include:

  • Project Loom - Enhancing concurrency with lightweight threads.
  • Project Panama - Improving the connection between Java and native code.
  • Project Valhalla - Exploring JVM support for value types.

These projects are crucial for the development of future Java features and will continue to influence how developers build applications.

For more insights, follow the Inside Java Newscast for updates on these projects.

Explore how you can integrate advanced authentication methods such as passwordless solutions for your applications by visiting mojoauth. Our services provide seamless, secure login experiences tailored for your web and mobile applications.

Top comments (0)