- GraalVM for JDK 23 (Latest)
- GraalVM for JDK 24 (Early Access)
- GraalVM for JDK 21
- GraalVM for JDK 17
- Archives
- Dev Build
Installation on Linux Platforms #
GraalVM is available for Linux on x64 and AArch64 architectures. You can install GraalVM on Linux:
Select the installation option that you prefer.
SDKMAN! #
Install Oracle GraalVM with SDKMAN!:
sdk install java <version>-graal
To install GraalVM Community Edition, change the distribution from graal
to graalce
in the command.
SDKMAN! helps you install and easily switch between JDKs. Check which GraalVM releases are available for installation by running:
sdk list java
From an Archive #
Install GraalVM from an archive (.tar.gz) for the current user into any location, without affecting other JDK installations.
-
Navigate to the GraalVM Downloads page. Select the Java version, Linux for the operating system, x64 or aarch64 for the architecture, and download.
-
Change to the directory where you want to install GraalVM, then move the .tar.gz file to that directory.
- Unzip the archive:
tar -xzf graalvm-jdk-<version>_linux-<architecture>.tar.gz
- There can be multiple JDKs installed on the machine. Configure the runtime environment:
- Set the value of the
JAVA_HOME
environment variable to the installation directory:export JAVA_HOME=/path/to/<graalvm>
- Set the value of the
PATH
environment variable to the GraalVM bin/ directory:export PATH=/path/to/<graalvm>/bin:$PATH
- Set the value of the
To confirm that the installation was successful, run the java -version
command.
Optionally, you can specify GraalVM as the default JRE or JDK installation in your Java IDE.
Script-Friendly URLs #
Script-friendly URLs enable you to download GraalVM from a command line, or automatically in your script and Dockerfile by using a download URL.
Substitute <version>
and <architecture>
with the JDK version and aarch64
or x64
architecture.
# Download with wget
wget https://download.oracle.com/graalvm/<version>/latest/graalvm-jdk-<version>_linux-<architecture>_bin.tar.gz
# Download with curl
curl https://download.oracle.com/graalvm/<version>/latest/graalvm-jdk-<version>_linux-<architecture>_bin.tar.gz
# Download from archive
curl https://download.oracle.com/java/<version>/archive/jdk-<version>_linux-<architecture>_bin.tar.gz
For other installation options, visit the GraalVM Downloads page.
Prerequisites for Native Image on Linux #
Native Image depends on the local toolchain (header files for the C library, glibc-devel
, zlib
, gcc
, and/or libstdc++-static
).
These dependencies can be installed (if not yet installed) using a package manager on your Linux machine.
On Oracle Linux use the yum
package manager:
sudo yum install gcc glibc-devel zlib-devel
Some Linux distributions may additionally require libstdc++-static
.
You can install libstdc++-static
if the optional repositories are enabled (ol7_optional_latest on Oracle Linux 7, ol8_codeready_builder on Oracle Linux 8, and ol9_codeready_builder on Oracle Linux 9).
On Ubuntu Linux use the apt-get
package manager:
sudo apt-get install build-essential zlib1g-dev
On other Linux distributions use the dnf
package manager:
sudo dnf install gcc glibc-devel zlib-devel libstdc++-static