Want to install GraalVM on OSX? It’s easy.
First, get SDKMan. Trust me. You want it. Almost as much as brew, if you’re doing anything with the JVM. You’ll want to install bash – via brew – because SDKMan uses bash and the OSX bash shell is badly outdated.
Once you have SDKMan installed and available in your shell, execute the following command:
$ sdk install java 22.214.171.124.r11-grl
If you don’t install it as the default JVM, you can select it as the current JVM with this:
$ sdk default java 126.96.36.199.r11-grl
You can check it with java -version:
$ java -version
openjdk version "11.0.5" 2019-10-15
OpenJDK Runtime Environment GraalVM CE 188.8.131.52 (build 11.0.5+10-jvmci-19.3-b06)
OpenJDK 64-Bit Server VM GraalVM CE 184.108.40.206 (build 11.0.5+10-jvmci-19.3-b06, mixed mode, sharing)
This installs the latest GraalVM installation for Java 11, as of when this was written. Enjoy!