Skip to content

Instantly share code, notes, and snippets.

@mainul35
Last active March 5, 2020 13:04
Show Gist options
  • Save mainul35/a7c764d970ba21b6a16a3ab68e83d006 to your computer and use it in GitHub Desktop.
Save mainul35/a7c764d970ba21b6a16a3ab68e83d006 to your computer and use it in GitHub Desktop.
Demonstrating how to install GraalVM on Linux
  1. Download from the official site.

  2. Extract it.

    sudo tar -zxvf graalvm-ce-java11-linux-amd64-20.0.0.tar.gz

  3. Move it to /usr/lib/jvm/

    mv graalvm-ce-java11-20.0.0 /usr/lib/jvm/

  4. Check your java alternatives

    sudo update-alternatives --config java

Output:

Selection    Command
-----------------------------------------------
   1           java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-1.fc31.x86_64/jre/bin/java)
*  2           /usr/lib/jvm/java-11-amazon-corretto/bin/java

Enter to keep the current selection[+], or type selection number: 

You can either select or leave as is.

  1. Install GraalVM Java as a Java alternative

    sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/graalvm-ce-java11-20.0.0/bin/java 3

  2. If you want to remove an alternative:

sudo update-alternatives --remove java /usr/lib/jvm/graalvm-ce-java11-20.0.0/bin/java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment