GraalVM is a JVM and development kit distribution that improves Java performance, supports multiple languages, and compiles Java applications into native binaries. Quarkus primarily uses its compiler and native-image capabilities. section 1.2.2 section 2.4.1
Its practical value for cloud-native Java comes from several capabilities:
- Native-image performs ahead-of-time compilation, producing a platform-specific, self-contained executable containing only the code required at runtime. section 2.4.1
- Native executables run without a JVM and can start in tens of milliseconds, making Java suitable for restrictive environments such as serverless platforms. section 1.2.2 section 2.4.1
- GraalVM also supports non-JVM languages such as JavaScript and Python, although its complete feature set extends beyond this focus. section 1.2.2
GraalVM sits beneath Quarkus build tooling. The Graal SDK integrates native-image builds, while Quarkus extensions supply compilation-specific information and reduce configuration, reflection, and tuning effort. section 1.4 section 1.6.1
Choosing JVM or native execution
Choose native compilation when startup time matters, such as for serverless services. Prefer the JVM when throughput is the main priority, as with some microservices. Native-image builds can require substantial configuration and tuning, so there is no universal choice. section 1.2.2
Figure 1.3 An overview of the Quarkus architecture in layers. Extensions that provide support for various frameworks are built around the core layer.
Use the layered architecture diagram to locate GraalVM beneath Quarkus build tooling and alongside the runtime and configuration layers. section 1.4
