Before diging into the details of GraalVM Polyglot features, you need setup your PC with the required software to run this lab.
The instructions to install GraalVM can be found here
# Untar in your prefered location
sudo tar -xvf ~/Downloads/graalvm-ee-java11-darwin-amd64-21.2.0.tar.gz -C /Library/Java/JavaVirtualMachines/
In case you already have the GraalVM installed, you can use sdkm man to reference it
#Make sure the version is referernced by SDKMan
$ sdk install java 21.2.0-ee11 /Library/Java/JavaVirtualMachines/graalvm-ee-java11-21.2.0/Contents/Home/
Linking java 21.2.0-ee11 to /Library/Java/JavaVirtualMachines/graalvm-ee-java11-21.2.0/Contents/Home/
Done installing!
#Use the last Enterprise version
$ sdk use java 21.2.0-ee11
After installing GraalVM, set your Java Home to point on these GraalVM fresh version.
#Check the version you are using
java -version
java version "11.0.12" 2021-07-20 LTS
Java(TM) SE Runtime Environment GraalVM EE 21.2.0 (build 11.0.12+8-LTS-jvmci-21.2-b06)
Java HotSpot(TM) 64-Bit Server VM GraalVM EE 21.2.0 (build 11.0.12+8-LTS-jvmci-21.2-b06, mixed mode, sharing)
By default GraalVM comes with Javascript language extension, you need to install others languages support using the provided Graal updater tool gu
.
# Install python, R ( mandatory ) , native-image(optionnal for this lab)
gu install python
gu install R
Run the below gu install
instructions and accept ✅ the licences requirements when asked.
#Check GraalVM Component list
$ gu list
ComponentId Version Component name Stability Origin
---------------------------------------------------------------------------------------------------------------------------------
graalvm 21.2.0 GraalVM Core -
R 21.2.0 FastR Experimental github.com
js 21.2.0 Graal.js Supported
llvm-toolchain 21.2.0 LLVM.org toolchain Supported github.com
native-image 21.2.0 Native Image Early adopter oca.opensource.oracle.com
python 21.2.0 Graal.Python Experimental oca.opensource.oracle.com
Helidon
is a simple, fast and lightweigth framework provided by Oracle to support your Microservice journey. We will be relying on Helidon to build the Covid-19 REST controller of the application. Helidon also provided a CLI util to rapidly setup a new project.
Use the following instructions to setup Helidon CLI for your target platform Helidon CLI setup
Check the helidon version
helidon version
build.date 2021-04-30 13:00:06 PDT
build.version 2.2.0
build.revision 17f7cba0
latest.helidon.version 2.3.2
You may also like to install the following tools
- Apache Maven
- sdkman
- httpie or curl command