The best way to set up GraalVM on Mac


Set up GraalVM with Homebrew

Homebrew is the most well-liked technique to set up something in your Mac.

brew set up graalvm/faucet/graalvm-ce-java17

Code language: Bash (bash)

Set up GraalVM with out Homebrew

Comply with these 5 steps to get GraalVM put in in your Mac.


Obtain the official binary:

Unpack the archive right into a folder.


Transfer the folder into the JavaVirtualMachines listing:

sudo mv graalvm-ce-java17-21.3.0 /Library/Java/JavaVirtualMachines

Code language: Bash (bash)

sudo is required as a result of /Library is a system listing.


Confirm the set up utilizing the java_home utility:

/usr/libexec/java_home -V

This now must be added to the PATH, however first let’s ensure we are able to reference the brand new location:

/usr/libexec/java_home -v 1.17

Code language: Bash (bash)

..ought to print out the newly created entry’s absolute listing path as above:


Open you ~/.bash_profile and add:

export JAVA_HOME=$(/usr/libexec/java_home -v 1.17) export PATH=$JAVA_HOME/bin:$PATH

Code language: Bash (bash)


Now to finish the set up, merely run the next:

gu set up native-image

Code language: Bash (bash)

This binary is positioned at /Library/Java/JavaVirtualMachines/graalvm-ce-<model>/Contents/Residence/bin if it’s not instantly accessible.


native-image will now be added to the trail.