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 220.127.116.11.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 18.104.22.168.r11-grl
You can check it with java -version:
$ java -version
openjdk version "11.0.5" 2019-10-15
OpenJDK Runtime Environment GraalVM CE 22.214.171.124 (build 11.0.5+10-jvmci-19.3-b06)
OpenJDK 64-Bit Server VM GraalVM CE 126.96.36.199 (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!