From 1d55f0f8be8037d37a190ab3ed70fc4614cab8ba Mon Sep 17 00:00:00 2001 From: Olya Gupalo Date: Wed, 28 Jun 2023 18:46:51 +0300 Subject: [PATCH] Update GraalVM setup steps --- docs/src/docs/asciidoc/graalvm-setup.adoc | 51 ++++++++++++------- .../asciidoc/gradle-plugin-quickstart.adoc | 9 +--- docs/src/docs/asciidoc/gradle-plugin.adoc | 9 +--- .../asciidoc/maven-plugin-quickstart.adoc | 9 +--- docs/src/docs/asciidoc/maven-plugin.adoc | 9 +--- 5 files changed, 41 insertions(+), 46 deletions(-) diff --git a/docs/src/docs/asciidoc/graalvm-setup.adoc b/docs/src/docs/asciidoc/graalvm-setup.adoc index 9c218ff6a..ac040e9d8 100644 --- a/docs/src/docs/asciidoc/graalvm-setup.adoc +++ b/docs/src/docs/asciidoc/graalvm-setup.adoc @@ -2,48 +2,63 @@ image:https://www.graalvm.org/resources/img/logo-colored.svg[GraalVM] -As a prerequisite for building with GraalVM Native Image, a GraalVM JDK is required and the `GRAALVM_HOME` and/or `JAVA_HOME` environment variables need to be set. +A prerequisite for using the Gradle or Maven plugin for GraalVM Native Image is to install GraalVM. +Follow the steps below to setup a GraalVM environment. -Following are the steps needed to obtain and setup a GraalVM environment. +[NOTE] +==== +This is just a quick overview, and users can consult the https://www.graalvm.org/docs/getting-started/[GraalVM Getting Started] before proceeding. +==== -NOTE: This is just a quick overview, and users can consult the https://www.graalvm.org/docs/getting-started/[GraalVM Getting Started section] before proceeding. +== 1. Download GraalVM -== 1. Obtaining distribution - -GraalVM distributions can be obtained from https://www.graalvm.org/downloads/[official website]. -Development builds might be available at `releases` section of https://github.com/graalvm/?q=graalvm-ce[official GraalVM Github page projects]. +The easiest way to download GraalVM is to use the https://sdkman.io/jdks[SDKMAN!]. +To install GraalVM for JDK 20 or JDK 17, run: +``` +sdk install java 20.0.1-graal +sdk install java 17.0.7-graal +``` +GraalVM installation includes Native Image. -== 2. Setting up environment variables +== 2. Set up Environment Variables -After obtaining GraalVM distribution environment variable `GRAALVM_HOME` should be set to point to it. +After obtaining a GraalVM distribution, set the `JAVA_HOME` and `PATH` environment variable. -This can be achieved using: +This can be achieved using this command: .Linux ```bash -export GRAALVM_HOME=/home/${current_user}/path/to/graalvm +export JAVA_HOME=/home/${current_user}/path/to/graalvm ``` .macOS ```bash -export GRAALVM_HOME=/Users/${current_user}/path/to/graalvm/Contents/Home +export JAVA_HOME=/Users/${current_user}/path/to/graalvm/Contents/Home ``` .Windows ```batch -setx /M GRAALVM_HOME "C:\path\to\graalvm" +setx /M JAVA_HOME "C:\path\to\graalvm" ``` -NOTE: Preferably user would also set `JAVA_HOME` variable in the same manner (by replacing `GRAALVM_HOME` with `JAVA_HOME` in previous commands). +In the same manner, set up the `PATH` environment variable: -== 3. `native-image` tool installation +.Linux +```bash +export JAVA_HOME=/home/${current_user}/path/to/graalvm/bin:$PATH +``` -.Linux / macOS +.macOS ```bash -$GRAALVM_HOME/bin/gu install native-image +export JAVA_HOME=/Users/${current_user}/path/to/graalvm/Contents/Home/bin:$PATH + ``` .Windows ```batch -%GRAALVM_HOME%/bin/gu install native-image +setx /M JAVA_HOME "C:\path\to\graalvm\bin;%PATH%" ``` + +For other installation options, go to the https://www.graalvm.org/downloads/[official website]. + +Development builds might be available at `releases` section of https://github.com/graalvm/?q=graalvm-ce[official GraalVM Github page projects]. \ No newline at end of file diff --git a/docs/src/docs/asciidoc/gradle-plugin-quickstart.adoc b/docs/src/docs/asciidoc/gradle-plugin-quickstart.adoc index 90d70644d..dbeb85d98 100644 --- a/docs/src/docs/asciidoc/gradle-plugin-quickstart.adoc +++ b/docs/src/docs/asciidoc/gradle-plugin-quickstart.adoc @@ -14,17 +14,12 @@ Two ways of building a native executable using the plugin will be demonstrated: ==== The plugin requires that you <>. -The easiest way to install GraalVM is to use the https://sdkman.io/jdks#grl[SDKMAN!]. -To install Oracle GraalVM for JDK 20 or JDK 17, run: +The easiest way to install GraalVM is to use the https://sdkman.io/jdks[SDKMAN!]. +To install GraalVM for JDK 20 or JDK 17, run: ``` sdk install java 20.0.1-graal sdk install java 17.0.7-graal ``` -To install GraalVM Community Edition for JDK 20 or JDK 17, run: -``` -sdk install java 20.0.1-graalce -sdk install java 17.0.7-graalce -``` GraalVM installation includes Native Image. For other installation options, go to https://www.graalvm.org/downloads/[GraalVM Downloads]. ==== diff --git a/docs/src/docs/asciidoc/gradle-plugin.adoc b/docs/src/docs/asciidoc/gradle-plugin.adoc index 73bebd145..7b56f8155 100644 --- a/docs/src/docs/asciidoc/gradle-plugin.adoc +++ b/docs/src/docs/asciidoc/gradle-plugin.adoc @@ -24,17 +24,12 @@ You can find full samples in https://github.com/graalvm/native-build-tools/tree/ ==== The plugin requires that you <>. -The easiest way to install GraalVM is to use the https://sdkman.io/jdks#grl[SDKMAN!]. -To install Oracle GraalVM for JDK 20 or JDK 17, run: +The easiest way to install GraalVM is to use the https://sdkman.io/jdks[SDKMAN!]. +To install GraalVM for JDK 20 or JDK 17, run: ``` sdk install java 20.0.1-graal sdk install java 17.0.7-graal ``` -To install GraalVM Community Edition for JDK 20 or JDK 17, run: -``` -sdk install java 20.0.1-graalce -sdk install java 17.0.7-graalce -``` GraalVM installation includes Native Image. For other installation options, go to https://www.graalvm.org/downloads/[GraalVM Downloads]. ==== diff --git a/docs/src/docs/asciidoc/maven-plugin-quickstart.adoc b/docs/src/docs/asciidoc/maven-plugin-quickstart.adoc index b992d4751..a1ef76e97 100644 --- a/docs/src/docs/asciidoc/maven-plugin-quickstart.adoc +++ b/docs/src/docs/asciidoc/maven-plugin-quickstart.adoc @@ -9,17 +9,12 @@ You will create a sample application, enable the plugin, add support for dynamic ==== The plugin requires that you <>. -The easiest way to install GraalVM is to use the https://sdkman.io/jdks#grl[SDKMAN!]. -To install Oracle GraalVM for JDK 20 or JDK 17, run: +The easiest way to install GraalVM is to use the https://sdkman.io/jdks[SDKMAN!]. +To install GraalVM for JDK 20 or JDK 17, run: ``` sdk install java 20.0.1-graal sdk install java 17.0.7-graal ``` -To install GraalVM Community Edition for JDK 20 or JDK 17, run: -``` -sdk install java 20.0.1-graalce -sdk install java 17.0.7-graalce -``` GraalVM installation includes Native Image. For other installation options, go to https://www.graalvm.org/downloads/[GraalVM Downloads]. ==== diff --git a/docs/src/docs/asciidoc/maven-plugin.adoc b/docs/src/docs/asciidoc/maven-plugin.adoc index 2def0beaf..7103c78da 100644 --- a/docs/src/docs/asciidoc/maven-plugin.adoc +++ b/docs/src/docs/asciidoc/maven-plugin.adoc @@ -25,17 +25,12 @@ You can find full samples in https://github.com/graalvm/native-build-tools/tree/ ==== The plugin requires that you <>. -The easiest way to install GraalVM is to use the https://sdkman.io/jdks#grl[SDKMAN!]. -To install Oracle GraalVM for JDK 20 or JDK 17, run: +The easiest way to install GraalVM is to use the https://sdkman.io/jdks[SDKMAN!]. +To install GraalVM for JDK 20 or JDK 17, run: ``` sdk install java 20.0.1-graal sdk install java 17.0.7-graal ``` -To install GraalVM Community Edition for JDK 20 or JDK 17, run: -``` -sdk install java 20.0.1-graalce -sdk install java 17.0.7-graalce -``` GraalVM installation includes Native Image. For other installation options, go to https://www.graalvm.org/downloads/[GraalVM Downloads]. ====