Getting Started with Oracle GraalVM

Oracle GraalVM compiles your Java applications ahead of time into standalone binaries that start instantly, provide peak performance with no warmup, and use fewer resources.

Here you will find information about installing Oracle GraalVM and running basic applications with it.

If you are new to Oracle GraalVM, we recommend starting with the GraalVM Overview, where you will find information about GraalVM’s benefits, distributions available, supported platforms, features support, and licensing.

If you have Oracle GraalVM already installed and have experience using it, you can skip this page and proceed to the in-depth reference manuals.

How Can I Get Oracle GraalVM?

You can get Oracle GraalVM by:

Choose your operating system and proceed to the installation steps for your specific platform:

Start Running Applications

Oracle GraalVM includes the Java Development Kit (JDK), the just-in-time compiler (the Graal compiler), Native Image, and other regular Java tools. You can use the GraalVM JDK just like any other JDK in your IDE, so having installed Oracle GraalVM, you can run any Java application unmodified.

The java launcher runs the JVM with Graal as the last-tier compiler. Check the installed Java version:

$JAVA_HOME/bin/java -version

Using GraalVM Native Image you can compile Java bytecode into a platform-specific, self-contained native executable to achieve faster startup and a smaller footprint for your application.

Compile this simplest HelloWorld.java application to bytecode and then build a native executable:

public class HelloWorld {
  public static void main(String[] args) {
    System.out.println("Hello, World!");
  }
}
javac HelloWorld.java
native-image HelloWorld

The last command generates an executable file named helloworld in the current working directory. Invoking it runs the natively compiled code of the HelloWorld class as follows:

./helloworld
Hello, World!

Note: For compilation native-image depends on the local toolchain. Make sure your system meets the prerequisites.

New Users

Continue to Native Image basics to gradually educate yourself about the technology. For users who are familiar with GraalVM Native Image but may have little experience using it, proceed to User Guides.

For more information on the Graal compiler, see the compiler documentation. Larger Java examples can be found in the GraalVM Demos repository on GitHub.

Oracle Cloud Users

Oracle Cloud users considering Oracle GraalVM for their cloud workloads are invited to read Oracle GraalVM on OCI. This page focuses on using Oracle GraalVM with an Oracle Cloud Infrastructure Compute instance.

Advanced Users

Developers who are more experienced with GraalVM or want to do more with GraalVM can proceed directly to Reference Manuals for in-depth documentation.

You can find information on GraalVM’s security model in the Security Guide, and rich API documentation in the Oracle GraalVM Java API Reference.

We also recommend checking the GraalVM Team Blog.