set up GraalVM on Mac

0
14


Set up GraalVM with Homebrew

Homebrew is the most popular method 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.

Step1:

Obtain the official binary: https://www.graalvm.org/downloads/

Unpack the archive right into a folder.

Step2:

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.

Step3:

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:

/Library/Java/JavaVirtualMachines/graalvm-ce-java17-21.3.0/Contents/Residence

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)

Step4:

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

gu set up native-image

Code language: Bash (bash)

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

Step5:

native-image will now be added to the trail.

LEAVE A REPLY

Please enter your comment!
Please enter your name here