docs/reference-manual/java/README.md
GraalVM is based on the Java HotSpot Virtual Machine, so any application that runs on the Java HotSpot Virtual Machine will also on GraalVM.
GraalVM includes an advanced compiler written in Java, known as the Graal compiler. At runtime, just like any other Java Virtual Machine (JVM), GraalVM loads an application and analyzes its code to detect performance bottlenecks, or hot spots. GraalVM passes the performance-critical code to the Graal just-in-time (JIT) compiler, which compiles it to machine code and then returns it.
The Graal compiler can improve the efficiency and the speed of applications written in Java, Scala, Kotlin, or other JVM languages through its unique approaches to code analysis and optimization.
For example, it assures performance advantages for highly-abstracted applications due to its ability to remove costly object allocations.
See the CEOptimization enum{:target="_blank"} in the GraalVM Community Edition GitHub repository for more information about platform-independent compiler optimizations.
The Graal (JIT) compiler is now also integrated with the Java HotSpot Virtual Machine. To find out more, see the section Graal Compiler.
GraalVM also includes the Truffle language implementation framework—a library, written in Java—to build interpreters for programming languages, which then run on GraalVM. These "Graal languages" can consequently benefit from the optimization possibilities of the Graal compiler. The pipeline for such compilation is:
See the Polyglot Programming and Embedding Languages guides for more information about interoperability with other programming languages.
Besides the Truffle framework, GraalVM incorporates its compiler into an advanced ahead-of-time (AOT) compilation technology—Native Image—which translates Java and JVM-based code into a native platform executable. These native executables start nearly instantaneously, are smaller, and consume less resources than their JVM counterparts, making them ideal for cloud deployments and microservices. For more information about AOT compilation, see Native Image.