Install GraalVM on macOS

GraalVM is a high-performance virtual machine built by Oracle that can run applications written in JavaScript, Python, Ruby, R, JVM-based languages such as Java, Scala, Kotlin, and LLVM-based languages. like C and C++. Using GraalVM, you do not need to install many different software to program in different languages, just install GraalVM is enough. In this tutorial, I will guide you all how to install GraalVM on macOS.

To install GraalVM, first go to https://www.graalvm.org/downloads/. GraalVM currently has two Community and Enterprise editions, and you can see the differences in the two versions on this download page. Here, I will be using the Community version, so I will go to the https://github.com/oracle/graal/releases page to download the GraalVM installation file.

After downloading the GraalVM installation file, unzip this file:

Install GraalVM on macOS

To use GraalVM anywhere on your machine, you need to set the environment variable pointing to the bin directory of the GraalVM directory. But since I currently have a Java version installed on my machine, to avoid touching, I just export a GRAALVM_HOME variable that points to the GraalVM Home folder.

To export the GRAALVM_HOME variable as I said above, I would open the .bash_profile file inside the user directory and add the following line:

Run the following command for our installation to take effect immediately:

Now I can check the results.

To check out the Java version that GraalVM has, you can use the following command

Result:

Install GraalVM on macOS

NodeJS:

Install GraalVM on macOS

npm:

Install GraalVM on macOS

By default, GraalVM only includes support for these languages. For other languages like Ruby, R, Python, etc., you need to use the gu tool to install them. For example, if I need to install to support the Ruby language, I will run the following command:

Result:

Install GraalVM on macOS

It is great, isn’t it? 🙂

Đánh giá bài viết
Chia sẽ bài viết này ...Share on Facebook
Facebook
0Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin

4 thoughts on “Install GraalVM on macOS

Add Comment