One-line GraalVM JDK Downloads

Fabio Niephaus
graalvm
Published in
3 min readOct 25, 2022

There are many ways to download GraalVM: The download page mentions how to download GraalVM Community Edition from GitHub, Enterprise Edition from OTN, or developer builds, and points at the GraalVM Community Container Images and Enterprise Container Images for Docker. In addition to that, you can also download GraalVM using the GitHub Action for GraalVM, the GraalVM Tools for Java VSCode extension, or Homebrew.

Downloading the latest GraalVM Enterprise JDK on a free OCI Ampere A1 Compute instance in one line.

Today, we are introducing one-line GraalVM JDK downloads! The new GraalVM JDK Downloader that performs the installation supports GraalVM CE and EE as well as Linux, macOS, and Windows (via Git Bash, Cygwin, or WSL). It is designed to be used in automated build pipelines or on developer machines, is fully open source, and makes it very easy to get started with GraalVM.

For example, need to quickly install the latest GraalVM JDK including Native Image on your machine or CI runner? Run the following to download everything you need in the current working directory:

bash <(curl -sL https://get.graalvm.org/jdk)

Do you need a specific GraalVM release? Simply add an argument:

bash <(curl -sL https://get.graalvm.org/jdk) \
graalvm-ce-java11-22.3.0

On top of that, the downloader will also let you know what dependencies need to be installed on your system, how to manage the new GraalVM installation with SDKMAN! if it’s available, and how to configure your machine to use the new installation correctly.

And what about GraalVM Enterprise? All you have to do is run the following command to set up a download token on your machine before using the new downloader (note that this command is interactive):

bash <(curl -sL https://get.graalvm.org/ee-token)

Download Options

The new downloader also provides some options. If you want to download a specific version of GraalVM to a specific directory, for example, you can run this:

bash <(curl -sL https://get.graalvm.org/jdk) \
--to "$HOME" graalvm-ee-java17-22.3.0

You can also install any GraalVM component such as the Python and Node.js runtimes or VisualVM in one go:

bash <(curl -sL https://get.graalvm.org/jdk) \
-c python,nodejs,visualvm graalvm-ee-java17-22.3.0

For all options, simply pass in the --help flag:

The --help flag in action.

Final Thoughts

We understand that some developers are cautious when it comes to one-line installations. Those of you can also just download the script and inspect it before running. Here’s an example:

# download the GraalVM JDK Downloader script
curl -OL https://get.graalvm.org/jdk
# inspect the script
less jdk
# run the script
bash jdk

To maximize transparency, we are maintaining and hosting all scripts in this repository on GitHub, contributions are welcome!

Finally, we also plan to integrate the new downloader into the GraalVM download page, allowing you to easily generate the right one-liner for you. Stay tuned!

As always, please feel free to share any feedback with us on Twitter, Slack, or GitHub!

--

--

Fabio Niephaus
graalvm
Editor for

Researcher on the GraalVM team at Oracle Labs. Developer tools, languages, virtual machines. HPI PhD graduate. Previously at Google and Maton Guitars.