# Run Into the New Year with Java's Ahead-of-Time Cache Features

DevFeed: [Run Into the New Year with Java's Ahead-of-Time Cache Features](<https://devfeed.tech/articles/run-into-the-new-year-with-java-s-ahead-of-time-cache-features-23028.md>)

Original publisher: [Read original article](<https://www.javaadvent.com/2025/12/run-java-aot-cache-optimizations.html>)

Author: Ana-Maria Mihalceanu

Published: 2025-12-17T03:03:45Z

Content type: tutorial

Language: en

Sources: [Java Advent Calendar](<https://devfeed.tech/sources/java-advent-calendar.md>)

Topics: [Cache](<https://devfeed.tech/topics/cache.md>), [Project Leyden](<https://devfeed.tech/topics/project-leyden.md>), [openjdk](<https://devfeed.tech/topics/openjdk.md>), [app startup](<https://devfeed.tech/topics/app-startup.md>)

Tags: [2025](<https://devfeed.tech/tags/2025.md>), [aot](<https://devfeed.tech/tags/aot.md>), [application](<https://devfeed.tech/tags/application.md>), [assembly](<https://devfeed.tech/tags/assembly.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [cache](<https://devfeed.tech/tags/cache.md>), [introduced](<https://devfeed.tech/tags/introduced.md>), [java](<https://devfeed.tech/tags/java.md>), [java-advent](<https://devfeed.tech/tags/java-advent.md>), [jdk](<https://devfeed.tech/tags/jdk.md>), [jdk25](<https://devfeed.tech/tags/jdk25.md>), [jep](<https://devfeed.tech/tags/jep.md>), [jit](<https://devfeed.tech/tags/jit.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [openjdk](<https://devfeed.tech/tags/openjdk.md>), [optimizations](<https://devfeed.tech/tags/optimizations.md>), [performance](<https://devfeed.tech/tags/performance.md>), [project-leyden](<https://devfeed.tech/tags/project-leyden.md>), [releases](<https://devfeed.tech/tags/releases.md>), [results](<https://devfeed.tech/tags/results.md>), [startup](<https://devfeed.tech/tags/startup.md>)

## AI overview

JDK 24 introduced an application-specific HotSpot AOT cache to speed startup by moving class loading and linking work earlier. The workflow is to record application observations during a training run, assemble those observations into a cache, then run the application with `-XX:AOTCache` pointing to it. JDK 25 added frequently executed method profiles to the cache so the JIT can begin generating native code at startup, improving warm-up; the excerpt says this requires no additional execution constraints. The supplied text also mentions simplified cache generation in JDK 25 but cuts off before explaining how.

## Source excerpt

As the year comes to a close, turn your focus to boosting your Java application performance by applying Ahead-of-Time (AOT) cache features in recent JDK releases. This article guides you through using AOT cache optimizations in your application, thereby minimizing startup time and achieving faster peak performance. What is the Ahead-of-time cache in the jdk [...] The post Run Into the New Year with Java's Ahead-of-Time Cache Features appeared first on JVM Advent.