GraalVM
| Company type | Software |
|---|---|
| Industry | Software development |
| Founded | 2019-05 |
| Founder | Oracle Labs |
| Products | Java Development Kit, Graal Compiler, GraalVM Native Image, Truffle Framework, GraalVM Polyglot API, JavaScript Runtime, LLVM Runtime |
| Owner | Oracle Corporation |
| Website | www |
GraalVM is a Java Development Kit (JDK) implemented in Java. Its open-source version derives from OpenJDK, whereas the enterprise edition is constructed upon Oracle JDK. GraalVM facilitates both just-in-time (JIT) compilation and ahead-of-time (AOT) compilation, which contributes to faster application startup, enhanced runtime efficiency, and decreased resource consumption. It is important to note that executables produced via AOT compilation are specific to their target platform.
Supporting a variety of programming languages and execution environments, GraalVM’s initial production-grade release, version 19.0, debuted in May 2019. The most recent version, GraalVM for JDK 23, was launched in September 2024.
Distinctive features of GraalVM with significant business impact include:
- Graal Compiler: a sophisticated just-in-time compilation engine.
- GraalVM Native Image: technology enabling ahead-of-time compilation for Java programs.
- Truffle Language Implementation Framework and GraalVM SDK: Java-centric frameworks and APIs designed for crafting high-efficiency language runtimes.
- GraalVM Polyglot API: allows integration of guest language code within Java applications.
- JavaScript Runtime: a runtime compliant with ECMAScript 2023 standards, incorporating Node.js support.
- LLVM Runtime: capability to run languages compiled into LLVM bitcode.
These functionalities establish GraalVM as a flexible platform aimed at enhancing application performance across multiple programming ecosystems.
Goals
- Achieve native-level performance for JVM-based languages.
- Decrease startup latency of JVM applications through ahead-of-time compilation methods.
- Facilitate GraalVM integration with Oracle Database, OpenJDK, Android/iOS platforms, and other specialized embeddings.
- Support embedding of guest language code within JVM host applications.
- Enable seamless combination of code from any programming language into unified "polyglot applications."
History
The origins of GraalVM trace back to the Maxine Virtual Machine initiative at Sun Microsystems Laboratories (currently Oracle Labs), which sought to develop a Java virtual machine entirely in Java to circumvent challenges associated with C++ development and exploit meta-circular optimization techniques. The project’s emphasis transitioned toward developing the Graal compiler by porting the HotSpot client compiler ("C1") from native code into Java, replacing the Maxine compiler previously used.
Graal was incorporated into HotSpot-based JDKs such as OpenJDK versions from Java SE 9 through 15, offering experimental ahead-of-time compilation capabilities. An option enabled Graal to substitute the server compiler ("C2"), but this was removed in Java SE 16 to prevent redundancy between the JDK and standalone GraalVM distributions. The standalone GraalVM includes the native-image utility, which compiles Java applications into native executables or shared libraries optimized for particular operating systems and hardware architectures.
Releases
Oracle distributes GraalVM under several licensing models: Oracle GraalVM under the GraalVM Free Terms and Conditions (GFTC) license; Oracle GraalVM Enterprise Edition governed by the "OTN License Agreement Oracle GraalVM Enterprise Edition Including License for Early Adopter Versions"; and a Community Edition available under an open-source license. The enterprise edition was first announced on May 8, 2019, followed by the introduction of Oracle GraalVM under the GFTC license on June 13, 2023. GraalVM can replace default JDK installations on Linux and macOS (supporting x64 and AArch64 processors) as well as Windows x64 platforms. Official release timelines are accessible via the Oracle Help Center and the GraalVM website.
GraalVM..21..3.. 20211019 Oracle..JDK..18..031,.11013,.17001 OpenJDK..18..0312,.11013,.17001 Java SE..17 distributions became available.; added Infeasible Path Correlation optimization to eliminate unreachable paths.; implemented Constant Blinding to mitigate JIT spraying attacks.; enhanced reflection metadata extraction.; initial compatibility with Java Platform Module System.; optimizations reducing executable size and build duration. GraalVM..22..00 2022 January18 Oracle..JDK..11014,.17002 OpenJDK..11014,.17002 Dropped support for Java SE versions from ..8 through ..16.; introduced user-friendly progress bars during Native Image builds.; improved module system compatibility.; added loop rotation optimization converting uncounted loops into counted loops. GraalVM..22..10 April19 Oracle..JDK..11015,.17003 OpenJDK..11015,.17003 Preview release supporting Apple Silicon (darwin-aarch64); new conditional configuration mode in Native Image using Tracing agent.; introduced “quick build” (-Ob) mode reducing development build times.; launched TruffleStrings shared string implementation for polyglot languages. GraalVM..22..20 July19 Oracle..JDK..11016,.17004 OpenJDK..11016,.17004 Reduced overall JDK size and memory footprint.; enhanced library compatibility.; initiated GraalVM Reachability Metadata Repository collaborating with Spring, Micronaut, Quarkus teams to assist incompatible libraries.; implemented Software Bill of Materials (SBOM); default execution via module path.; decoupled JavaScript and LLVM runtimes plus VisualVM as optional installable components. GraalVM..22..30 October18 Oracle JDK ..11017,.17005,.19001 OpenJDK ..11017,.17005,.19001 Final release supporting Java SE ..11.; last feature update of the year.; Enterprise edition supported for eighteen months, Community edition for twelve months.; introduced builds for Java SE ..19 with latest features.; Native Image incorporated Project Loom Virtual Threads (JEP425); added jlink support along with new monitoring tools.; renamed GraalPython to GraalPy. GraalVM for JDK ..17 June13 Oracle JDK ..17007 OpenJDK ..17007 Launched Oracle GraalVM under new GFTC licensing terms.; delivered performance improvements including ZGC garbage collector implementation.; introduced Native Image Bundles featuring ML-based profile inference predicting control flow branches.; automated setup of Windows build environment. GraalVM for JDK ..20 June13 Oracle JDK ..20001 OpenJDK ..20001 GraalVM for JDK ..21 September19 Oracle JDK ..21 OpenJDK ..21 Rolled out full feature set of Java SE ..21 including Project Loom virtual threads.; boosted performance of ahead-of-time compiled Java apps matching HotSpot levels.; enabled G1 Garbage Collector on Linux AArch64 within Native Image.; restructured SDK into four distinct modules.; modularized language runtimes into independent Java libraries available on Maven Central.; designated as current Long-Term Support release. GraalVM for JDK ..22 March19 Oracle JDK ..22 OpenJDK ..22 GraalVM for JDK ..23 September17 Oracle JDK ..23 OpenJDK ..23| Release | Date | Java Version | Features |
|---|---|---|---|
| GraalVM 19.0.0 | 2019-05-09 | OpenJDK 1.8.0_212 | Initial production release targeting Linux and macOS x64; Windows support introduced as an early adopter feature. |
| GraalVM 19.1.0 | 2019-07-02 | OpenJDK 1.8.0_212 | Launched libgraal, a precompiled Graal compiler binary enhancing compilation speed; improved profile-guided optimization (PGO) for Native Image builds.
|
| GraalVM 19.2.0 | 2019-08-20 | OpenJDK 1.8.0_222 | Introduced preliminary LLVM toolchain support for native applications; enhanced throughput and PGO data collection for Native Image; added customizable polyglot access controls; previewed Java Flight Recorder plugin. |
| GraalVM 19.3.0 | 2019-11-19 | Oracle JDK 1.8.0_231, 11.0.5
OpenJDK 1.8.0_232,11.0.5 |
First builds based on Java SE 11; added Linux AArch64 support and experimental Windows x64 platform; implemented module encapsulation and Native Image Maven Plugin; Enterprise edition marked first Long-Term Support (LTS) release. |
| GraalVM 20.0.0 | 2020-02-18 | Oracle JDK 1.8.0_241, 11.0.6
OpenJDK 1.8.0_242, 11.0.6 |
Improved compatibility with Windows; advanced Native Image tooling and technology; updates to compiler and language support. |
| GraalVM 20.1.0 | 2020-05-19 | Oracle JDK 1.8.0_251, 11.0.7
OpenJDK 1.8.0_252, 11.0.7 |
Performance enhancements across components; full ECMAScript 2020 compliance in JavaScript engine; better Ruby support including native gems compatibility. |
| GraalVM 20.2.0 | 2020-08-18 | Oracle JDK 8u261, 11.0.8
OpenJDK 1.8.0_262, 11.0.8 |
Introduced Partial Loop Unrolling optimization; improved garbage collection behavior for Native Image workloads; enabled generation of largely static executables. |
| GraalVM 20.3.0 | 2020-11-17 | Oracle JDK 1.8.0_271, 11.0.9
OpenJDK 1.8.0_272, 11.0.9 |
Year’s first LTS Enterprise release; enabled code sharing in LLVM runtime; experimental sandbox resource limit feature introduced. |
| GraalVM 21.0.0 | 2021-01-19 | Oracle JDK 1.8.0_281,11.0.10
OpenJDK 1.8.0_282,11.0.10 |
Debuted Java on Truffle JVM implementation; added serialization support and Linux AWT/Swing compatibility in Native Image; improved updater mechanisms. |
| GraalVM 21.1.0 | 2021-04-20 | Oracle JDK 1.8.0_291, 11.0.11,16.0.1
OpenJDK 1.8.0_292,11.0.11,16.0 .1 |
Experimental support for Java 16 included; enhanced Linux AArch64 compatibility; improved reporting in Native Image and Windows platform support; multi-tier compilation enabled by default. |
| GraalVM 21.2 .0 | 2021 -07 -20 | Oracle JDK .1 .8 .0301 , .11 .012 , .16 .02
OpenJDK .1 .8 .0302 , .11 .012 , .16 .02 |
Introduced SIMD vectorization optimization alongside Strip Mining for loops; released official Gradle and Maven plugins with initial JUnit testing capabilities; added Java Flight Recorder integration and an “epsilon” garbage collector for no-GC executables. |
Components
GraalVM includes the Graal compiler as part of its standard Java virtual machine distribution (OpenJDK). Beyond this, it offers supplementary modules that facilitate alternative execution methods (such as GraalVM Native Image) and support additional programming languages (including the LLVM runtime, GraalVM JavaScript—a potential successor to the discontinued Nashorn engine—and TRegex, a regular expression processing engine).
Compiler
The GraalVM compiler represents a state-of-the-art Java (JIT) compiler designed to either augment or replace the conventional HotSpot compilers (C1/C2). Constructed in a modular fashion using Java, it provides ease of maintenance and extensibility. Graal is distributed under the GPL version 2 along with the classpath exception.
Native Image
GraalVM Native Image is an ahead-of-time compilation tool that transforms class files into standalone executable binaries. Initially introduced as an early adopter feature, it has matured into a production-level technology, though it may undergo updates that are not backward compatible.
This technology accommodates JVM-based languages and can optionally support dynamic languages implemented on GraalVM via the Truffle framework. The generated native executable operates independently of a JVM, relying on runtime components such as thread management and garbage collection from a lightweight virtual machine called Substrate VM. By bundling application classes, JDK dependencies, and libraries into a single binary, it achieves significantly faster startup and runtime performance.
Native Image enjoys official backing from various Java frameworks including Fn, Gluon, Helidon, Micronaut, Picocli, Quarkus, Vert.x, and Spring Boot.
In September 2016, Oracle revealed intentions to incorporate ahead-of-time compilation into OpenJDK for Java SE 9 through GraalVM. This effort is documented under JEP 295 and was integrated into Java SE 9. Experimental support for using GraalVM as a just-in-time compiler was introduced for Linux x64 in Java SE 10.
From Java SE versions 9 through 15, the command facilitates executable creation while the flag activates the Graal JIT compiler. This capability remains available within the Native Image component of standalone GraalVM distributions.
Truffle Language Implementation Framework
Oracle Labs developed the Truffle framework alongside GraalVM; it functions as an abstract syntax tree (AST) interpreter that simplifies language implementation on top of GraalVM. Numerous languages have been created using Truffle, including a C interpreter delivering performance comparable to GCC and Clang.
Both Truffle and the GraalVM SDK are released under the Universal Permissive License 1.0, encouraging adoption by projects seeking permissive licensing without stringent copyright constraints.
Instrumentation-Based Tool Support
A significant commercial benefit of GraalVM lies in its fully dynamic, language-neutral instrumentation capabilities embedded within the VM runtime. This feature enables API clients to capture runtime execution events with minimal impact on optimized code performance.
The core GraalVM distribution bundles a language-agnostic debugger, profiler, heap analyzer, and other utilities that utilize this instrumentation framework. Additionally, GraalVM supports the Chrome Inspector remote debugging protocol—originally designed for JavaScript—which can be extended to all languages running on GraalVM through browser-based tools.
Embedding languages
GraalVM facilitates the integration of guest language code within Java applications, enabling the development of polyglot software. Programmers can embed languages such as JavaScript, Python, and others supported by GraalVM directly into Java source files, taking advantage of each language’s distinct features. Both the host Java application and embedded guest languages operate within a shared memory environment, made possible through the Truffle Language Implementation Framework alongside the GraalVM Polyglot API. For instance, Java can invoke a Python function to increment a value, employing canExecute() to perform security validations prior to execution. Additional usage examples can be found in the Embedding Languages reference documentation.
Language and runtime support
Designed primarily for the Java platform, GraalVM executes any language that compiles down to Java bytecode, encompassing languages like Java itself, Scala, and Kotlin.
Beyond these, GraalVM extends its capabilities through the Truffle Language Implementation Framework to accommodate several more languages:
- GraalJS: A JavaScript runtime compliant with ECMAScript 2023 standards, including Node.js compatibility
- GraalPy: An implementation of Python 3
- GraalVM LLVM Runtime (Sulong): An interpreter for LLVM bitcode
- GraalWasm: An engine for executing WebAssembly
- TruffleRuby: A Ruby implementation offering initial support for Ruby on Rails
- FastR: An implementation of the R language
Developers have the ability to add support for additional languages. Prominent third-party implementations include grCuda, SOMns, TruffleSqueak, and Yona.