Created
January 24, 2021 19:39
-
-
Save larmic/91750bbae531a88696544c59d5f909d9 to your computer and use it in GitHub Desktop.
Install graalvm on osx using homebrew
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```shell | |
# install graalVM 11 | |
$ brew install --cask graalvm/tap/graalvm-ce-java11 | |
# show installed versions | |
$ /usr/libexec/java_home -v 11 -V | |
Matching Java Virtual Machines (2): | |
11.0.9.1 (x86_64) "AdoptOpenJDK" - "AdoptOpenJDK 11" /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home | |
11.0.9 (x86_64) "GraalVM Community" - "GraalVM CE 20.3.0" /Library/Java/JavaVirtualMachines/graalvm-ce-java11-20.3.0/Contents/Home | |
/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home | |
# uninstall adoptopenjdk11 | |
$ brew uninstall --cask adoptopenjdk11 | |
# set JAVA_HOME and GRAALVM_HOME | |
$ export JAVA_HOME=`/usr/libexec/java_home -v 11` | |
$ export GRAALVM_HOME=$JAVA_HOME | |
# try it out | |
$ java --version | |
openjdk 11.0.9 2020-10-20 | |
OpenJDK Runtime Environment GraalVM CE 20.3.0 (build 11.0.9+10-jvmci-20.3-b06) | |
OpenJDK 64-Bit Server VM GraalVM CE 20.3.0 (build 11.0.9+10-jvmci-20.3-b06, mixed mode, sharing) | |
# on “graalvm-ce-<version>” can’t be opened because its integrity cannot be verified. | |
# see https://github.com/graalvm/homebrew-tap/issues/6 | |
$ xattr -d com.apple.quarantine /Library/Java/JavaVirtualMachines/graalvm-ce-java11-20.3.0 | |
# install native-image | |
$ ${GRAALVM_HOME}/bin/gu install native-image | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment