This allows for faster initialization, greater runtime performance, and decreased resource consumption, but the resulting executable can only run on the platform it was compiled for.
[9] Graal was included in HotSpot-based JDK releases such as OpenJDK from Java SE 9 through 15, to provide experimental ahead-of-time compilation.
[10] The option was removed in Java SE 16 to eliminate the duplicate effort of maintaining a version in the JDK and a standalone GraalVM release.
A similar function to create a native executable from a Java application is provided by the native-image tool of standalone GraalVM releases.
The tool processes a Java application's classes and other metadata to create a binary for a specific operating system and architecture.
GraalVM Native Image is an ahead-of-time compilation technology that produces executable binaries of class files.
The executable file does not run on a JVM and uses necessary runtime components such as thread scheduling or GC from a minimal bespoke virtual machine called Substrate VM.
Since the resulting native binary includes application classes, JDK dependencies and libraries already, the startup and execution time are reduced significantly.
GraalVM Native Image is officially supported by the Fn, Gluon, Helidon, Micronaut, Picocli, Quarkus, Vert.x and Spring Boot Java frameworks.
A major advantage of the GraalVM ecosystem is language-agnostic, fully dynamic instrumentation support directly built into the VM runtime.
[25][26] The core GraalVM installation provides a language-agnostic debugger, profiler, heap viewer, and others based on instrumentation and other VM support.