GraalVM Environment

An environment providing the Graal Java Virtual Machine

This notebook creates a reusable environment with the Graal JVM.

Nextjournal uses the the Graal JVM Community Edition. Note that the GraalVM version and installation directory are set as environment variables on the runtime.

GraalVM
GraalVM (Bash)
exporting environment
Type: Nextjournal
Environment:
Machine Type:
Environment Variables:
GRAAL_VERSION20.0.0
PATH/usr/local/graalvm/bin:/opt/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
GRAAL_DIR/usr/local/graalvm
JAVA_VERSION8
Download this environment as a Docker image from:

Download the install tarfile.

file="graalvm-ce-java${JAVA_VERSION}-linux-amd64-${GRAAL_VERSION}.tar.gz"
path="graalvm/graalvm-ce-builds/releases/download/vm-${GRAAL_VERSION}/${file}"
url="https://github.com/${path}"
wget --progress=bar:force -P /results $url
18.0s
GraalVM (Bash)
graalvm-ce-java8-linux-amd64-20.0.0.tar.gz

Extract to the installation dir.

mkdir $GRAAL_DIR
tar -zxf 
graalvm-ce-java8-linux-amd64-20.0.0.tar.gz
\
  -C $GRAAL_DIR --strip-components=1
16.7s
GraalVM (Bash)

And test.

java -version
1.2s
GraalVM (Bash)

Install the Native Image executable.

gu install native-image
3.0s
GraalVM (Bash)
Runtimes (1)