Remove the Experimental AOT and JIT Compiler

Ahead-of-Time (AOT) and Just-in-Time (JIT) compilation are strategies for improving Java application performance.
In earlier Java versions, experimental AOT and JIT compilers were introduced to explore new optimization techniques.
However, starting from Java 17, these experimental features have been removed to simplify the JDK, reduce maintenance costs, and focus on proven, production-ready technologies.


What Were the Experimental AOT and JIT Compilers?

Java normally uses the JIT compiler inside the Java Virtual Machine (JVM).
This JIT compiler optimizes bytecode at runtime, leading to better performance after warm-up.

In Java 9, experimental features were introduced:

  • AOT Compilation (jaotc tool): Compile Java bytecode into native machine code before running the program.

  • Experimental JIT Compiler (Graal): A new, high-performance JIT compiler written in Java.

Purpose:
The idea was to improve startup times and performance by combining AOT compilation with an experimental, pluggable JIT compiler.


Why Remove Experimental AOT and JIT Compiler?

Reason Details
Low Adoption Very few developers used AOT or the experimental JIT features in production.
Complexity Maintaining experimental code paths added extra burden to JDK developers.
Availability of Better Tools Native Image (GraalVM) and Project Leyden offer better solutions for AOT needs.
Focus on Proven Solutions Java core team wants to prioritize stable, mature JITs like HotSpot’s C2 compiler.
Platform Simplification Reducing unused features makes Java simpler and smaller.

Thus, AOT and experimental JIT support (especially the jaotc tool) are removed in Java 17.


Specific Features Removed in Java 17

Removed Item Description
jaotc tool Command-line tool for AOT compiling class files into native libraries.
JVM options like -XX:+UseJVMCICompiler Experimental options to enable JVM Compiler Interface-based compilers.
JVM options like -XX:AOTLibrary Options to load precompiled AOT native code libraries.
Related experimental APIs and internal support code All backend support for integrating experimental AOT and JIT compilers.

These features were marked experimental and could have performance unpredictability — a major reason for their removal.


What Are the Alternatives Now?

Java developers looking for native compilation or startup optimizations should consider:

Alternative Description
GraalVM Native Image Compile Java applications into native executables, dramatically reducing startup time.
Project Leyden (Future) Standardize ahead-of-time compilation and related optimizations for Java SE.
Container Optimization Using container-friendly JVMs and tuning startup behavior manually.

Thus, the ecosystem is not losing the ability to optimize; it is moving to more mature and production-grade solutions.


Before and After Java 17

Feature Before Java 17 After Java 17
jaotc AOT tool Available as experimental Removed
Experimental JIT via JVMCI Available with options Removed
Native executable creation Possible but rare Use GraalVM Native Image
Startup optimization Experimental support Focus on proven JVM tuning and GraalVM

The removal of the experimental AOT and JIT compilers in Java 17 is a smart move to simplify the JDK, reduce technical debt, and focus engineering efforts on proven technologies.
Java developers now have better, more stable, and future-ready alternatives like GraalVM and upcoming innovations from Project Leyden.

By removing these half-adopted experimental features, Java 17 ensures a cleaner, more efficient, and focused platform — ready to meet the performance needs of modern, cloud-native, microservices-based applications.

Scroll to Top