Tooling Advanced

Cache class loading and compilation for instant startup.

โœ• Java 8
// Every startup:
// - Load 10,000+ classes
// - Verify bytecode
// - JIT compile hot paths
// Startup: 2-5 seconds
โœ“ Java 25
// Training run:
$ java -XX:AOTCacheOutput=app.aot \
    -cp app.jar com.App
// Production:
$ java -XX:AOTCache=app.aot \
    -cp app.jar com.App
See a problem with this code? Let us know.
โšก

Faster startup

Skip class loading, verification, and linking.

๐Ÿ“ฆ

Cached state

Training run captures the ideal class state.

๐Ÿ”ง

No code changes

Works with existing applications โ€” just add JVM flags.

Old Approach
Cold Start Every Time
Modern Approach
AOT Cache
Since JDK
25
Difficulty
Advanced
AOT class preloading
Available

Available as a standard feature in JDK 25 LTS (JEPs 514/515, Sept 2025).

AOT class preloading caches loaded and linked classes from a training run. On subsequent starts, classes are loaded from the cache, skipping verification and linking. Combined with AOT compilation, this dramatically reduces startup time.

Share ๐• ๐Ÿฆ‹ in โฌก