Ubuntu Ships Java, Spring, AOT

John Rose, 6/02/2025

On Ubuntu Community Discourse there is a new post (5/23/2025) that gives a roundup of programming toolchains powering Ubuntu application development.

It lists a beautifully curated collection of tool chains. I am struck how we can take for granted easy access to ridiculously good tools. It was not always this way; as young hobbyist (in the Stone Age) I would have given much for such a wealth of programming power.

Now, as a long-time Java fan, and JVM implementor, I am very happy to see the Java and Spring Boot support, and I am fascinated by the other offerings as well.

The post mentions the need for ahead-of-time (AOT) optimizations for microservices, because of their demanding startup requirements:

Modern, cloud-native Java backends are, typically, logically divided into microservices. Performance requirements might expect some microservices to start and be available without any measurable delays. Due to startup delays inherent in the Java platform, it is difficult to have applications booting with sub-second delays. We offer two plausible solutions for this problem - OpenJDK CRaC and GraalVM Native Image. Spring Boot has built-in support for both of these Java Development Kits.

It is clear that AOT optimizations for Java, as used by Spring, continue to evolve rapidly. The Ubuntu post above mentions CRaC and GraalVM, probably because those are relatively established tools for the release levels relevant to Ubuntu. And now there is a third option on the table.

The “AOT Cache” from OpenJDK Project Leyden is a strong refresh of the old Class Data Sharing (CDS). Besides EA releases, it is delivered in JDK 24, and improved in JDK 25, with more to come. I think it fits neatly alongside CRaC and GraalVM, with its own use cases and tradeoffs. (There are links below to comparisons and tradeoffs.) We on the HotSpot team have been working with the Spring Boot team to make sure it specifically addresses their use cases.

Looking into the fine print, I see the post cites CRaC and GraalVM as solutions for microservices which cannot endure “measurable delays”, which seems to mean “sub-second delays”. The AOT Cache technology lowers Java startup delays significantly, sometimes but not always below a second. For larger multi-session applications it also reduces warmup delays. If an end user finds the performance enabled by Leyden is appropriate, Leyden’s simple user model should prove attractive. Since Leyden is built into HotSpot, it inherits that JVM’s application format (so no application changes), its dynamic capabilities (like reflection) and its robust performance across many metrics. See the Spring team evaluations below for some numbers.

Perhaps Java 24 is ahead of the release curve for Ubuntu’s present roundup of toolchains, but if so, it is only a little ahead. As Ubuntu users reach JDK 24 and beyond, they will find Leyden AOT technology as an interesting option, built into every OpenJDK and Spring download.

Here are a few links to more information about OpenJDK Leyden work in 2024 and 2025:

current Spring / Leyden talk by Moritz Halbritter:
https://speakerdeck.com/mhalbritter/step-up-the-performance-game-with-spring-boot-and-project-leyden

excellent EA perspective from Sébastien Deleuze:
https://spring.io/blog/2024/08/29/spring-boot-cds-support-and-project-leyden-anticipation

2024 Leyden team update:
https://www.youtube.com/watch?v=OOPSU4LnKg0

Leyden debug in JDK 24, deliveries in JDK 25, and post-25 work:
https://openjdk.org/jeps/483 (JDK 24)
https://openjdk.org/jeps/514 (JDK 25)
https://openjdk.org/jeps/515 (JDK 25)
https://openjdk.org/jeps/8335368 (after JDK 25)