HomeSoftware Engineeringset up GraalVM on Mac

set up GraalVM on Mac


Set up GraalVM with Homebrew

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

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

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

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
```<determine class="wp-block-image size-large">

<img decoding="async" loading="lazy" width="800" peak="106" src="https://ao.ms/wp-content/uploads/2021/11/image-1-800x106.png" alt="" class="wp-image-8283" srcset="https://ao.ms/wp-content/uploads/2021/11/image-1-800x106.png 800w, https://ao.ms/wp-content/uploads/2021/11/image-1-300x40.png 300w, https://ao.ms/wp-content/uploads/2021/11/image-1-768x101.png 768w, https://ao.ms/wp-content/uploads/2021/11/image-1.png 954w" sizes="(max-width: 800px) 100vw, 800px" /> </determine> 

This now must be added to the `PATH`, however first let&#8217;s ensure that we are able to reference the brand new location:

/usr/libexec/java_home -v 1.17


..ought to print out the newly created entry&#8217;s absolute listing path as above:

`/Library/Java/JavaVirtualMachines/graalvm-ce-java17-21.3.0/Contents/Dwelling`

Open you `~/.bash_profile` and add:

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


### Step4:

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

gu set up native-image


This binary is positioned at `/Library/Java/JavaVirtualMachines/graalvm-ce-<model>/Contents/Dwelling/bin` if it&#8217;s not instantly out there.

### Step5:

`native-image` will now be added to the trail.
RELATED ARTICLES

Most Popular

Recent Comments