Skip to content

Commit 5a8c905

Browse files
committed
Fold GraalVM CE and Oracle GraalVM install guides into one and add more install options
1 parent 83d51f4 commit 5a8c905

File tree

4 files changed

+105
-23
lines changed

4 files changed

+105
-23
lines changed

docs/getting-started/graalvm-community/get-started-graalvm-community.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ permalink: /docs/getting-started/
77

88
# Getting Started with GraalVM
99

10-
GraalVM compiles your Java applications ahead of time into standalone binaries that start instantly, provide peak performance with no warmup, and use fewer resources.
11-
10+
GraalVM is an advanced JDK with ahead-of-time Native Image compilation.
1211
Here you will find information about installing GraalVM and running basic applications with it.
1312

14-
If you are new to GraalVM, we recommend starting with the [introduction to GraalVM](../../introduction.md), where you will find information about GraalVM's benefits, distributions available, supported platforms, features support, and licensing.
13+
If you are new to GraalVM, we recommend starting with the [introduction to GraalVM](../../introduction.md), where you will find information about GraalVM's benefits, distributions, certified platforms, available features, and licensing.
1514

1615
If you have GraalVM already installed and have experience using it, you can skip this page and proceed to the in-depth [reference manuals](../../reference-manual/reference-manuals.md).
1716

@@ -30,7 +29,7 @@ You can use the GraalVM JDK just like any other JDK in your IDE, so having insta
3029
The `java` launcher runs the JVM with Graal as the last-tier compiler.
3130
Check the installed Java version:
3231
```shell
33-
$JAVA_HOME/bin/java -version
32+
java -version
3433
```
3534

3635
Using [GraalVM Native Image](../../reference-manual/native-image/README.md) you can compile Java bytecode into a platform-specific, self-contained native executable to achieve faster startup and a smaller footprint for your application.
@@ -47,6 +46,7 @@ public class HelloWorld {
4746
```shell
4847
javac HelloWorld.java
4948
```
49+
5050
```shell
5151
native-image HelloWorld
5252
```

docs/getting-started/graalvm-community/linux.md

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,65 @@ permalink: /docs/getting-started/linux/
88
## Installation on Linux Platforms
99

1010
GraalVM is available for Linux on x64 and AArch64 architectures.
11+
You can install GraalVM on Linux:
12+
* [using SDKMAN!](#sdkman)
13+
* [from an archive](#from-an-archive)
14+
* [using script-friendly URLs](#script-friendly-urls)
1115

12-
You can install GraalVM on Linux from an archive (_.tar.gz_) for the current user into any location, without affecting other JDK installations.
16+
Select the installation option that you prefer.
1317

14-
Follow these steps to install GraalVM:
18+
## SDKMAN!
1519

16-
1. Navigate to the [GraalVM Downloads page](https://www.graalvm.org/downloads/). Select **22** for the Java version, **Linux** for the operating system, **x64** or **aarch64** for the architecture, and download.
20+
Install GraalVM with [SDKMAN!](https://sdkman.io/):
21+
```
22+
sdk install java 23-graalce
23+
```
24+
25+
SDKMAN! helps you install and easily switch between JDKs.
26+
Check which GraalVM releases are available for installation by running:
27+
```bash
28+
sdk list java
29+
```
30+
31+
## From an Archive
32+
33+
Install GraalVM from an archive (_.tar.gz_) for the current user into any location, without affecting other JDK installations.
34+
35+
1. Navigate to the [GraalVM Downloads page](https://www.graalvm.org/downloads/). Select **23** for the Java version, **Linux** for the operating system, **x64** or **aarch64** for the architecture, and download.
1736

1837
2. Change to directory where you want to install GraalVM, then move the _.tar.gz_ file to that directory.
1938

2039
3. Unzip the archive:
2140
```shell
2241
tar -xzf graalvm-jdk-<version>_linux-<architecture>.tar.gz
2342
```
24-
4. There can be multiple JDKs installed on the machine. The next step is to configure the runtime environment:
43+
44+
4. There can be multiple JDKs installed on the machine. Configure the runtime environment:
2545
- Set the value of the `JAVA_HOME` environment variable to the installation directory:
2646
```shell
2747
export JAVA_HOME=/path/to/<graalvm>
2848
```
2949
- Set the value of the `PATH` environment variable to the GraalVM _bin_ directory:
3050
```shell
3151
export PATH=/path/to/<graalvm>/bin:$PATH
32-
```
33-
5. To confirm that the installation was successful, run the `java -version` command.
52+
```
53+
54+
To confirm that the installation was successful, run the `java -version` command.
55+
Optionally, you can specify GraalVM as the default JRE or JDK installation in your Java IDE.
56+
57+
## Script-Friendly URLs
58+
59+
[Script-friendly URLs](https://www.oracle.com/java/technologies/jdk-script-friendly-urls/) enable you to download GraalVM from a command line, or automatically in your script and Dockerfile by using a download URL.
60+
Substitute `<version>` and `<architecture>` with the JDK version and `aarch64` or `x64` architecture.
61+
```bash
62+
# Download with wget
63+
wget https://download.oracle.com/graalvm/23/latest/graalvm-jdk-23_linux-<architecture>_bin.tar.gz
64+
65+
# Download with curl
66+
curl https://download.oracle.com/graalvm/23/latest/graalvm-jdk-23_linux-<architecture>_bin.tar.gz
67+
68+
# Download from archive
69+
curl https://download.oracle.com/java/23/archive/jdk-23_linux-<architecture>_bin.tar.gz
70+
```
3471

35-
Optionally, you can specify GraalVM as the default JRE or JDK installation in your Java IDE.
72+
For other installation options, visit the [GraalVM Downloads page](https://www.graalvm.org/downloads/).

docs/getting-started/graalvm-community/macos.md

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,33 @@ permalink: /docs/getting-started/macos/
88
## Installation on macOS Platforms
99

1010
GraalVM is available for macOS on x64 and AArch64 architectures.
11+
You can install GraalVM on macOS:
12+
* [using SDKMAN!](#sdkman)
13+
* [from an archive](#from-an-archive)
14+
* [using script-friendly URLs](#script-friendly-urls)
1115

1216
Note that on macOS the JDK installation path is: <em>/Library/Java/JavaVirtualMachines/&lt;graalvm&gt;/Contents/Home</em>.
1317

14-
Follow these steps to install GraalVM:
18+
Select the installation option that you prefer.
1519

16-
1. Navigate to the [GraalVM Downloads page](https://www.graalvm.org/downloads/). Select **22** for the Java version, **macOS** for the operating system, **x64** or **aarch64** for the architecture, and download.
20+
## SDKMAN!
21+
22+
Install GraalVM with [SDKMAN!](https://sdkman.io/):
23+
```
24+
sdk install java 23-graalce
25+
```
26+
27+
SDKMAN! helps you install and easily switch between JDKs.
28+
Check which GraalVM releases are available for installation by running:
29+
```bash
30+
sdk list java
31+
```
32+
33+
## From an Archive
34+
35+
Install GraalVM from an archive (_.tar.gz_) for the current user into any location, without affecting other JDK installations.
36+
37+
1. Navigate to the [GraalVM Downloads page](https://www.graalvm.org/downloads/). Select **23** for the Java version, **macOS** for the operating system, **x64** or **aarch64** for the architecture, and download.
1738

1839
2. Remove the quarantine attribute (required for macOS Catalina and later):
1940
```shell
@@ -40,16 +61,32 @@ Follow these steps to install GraalVM:
4061
- Set the value of the `PATH` environment variable to the GraalVM _bin_ directory:
4162
```shell
4263
export PATH=/Library/Java/JavaVirtualMachines/<graalvm>/Contents/Home/bin:$PATH
43-
```
44-
45-
6. To check whether the installation was successful, run the `java -version` command.
64+
```
4665

66+
To confirm that the installation was successful, run the `java -version` command.
4767
Optionally, you can specify GraalVM as the default JRE or JDK installation in your Java IDE.
4868

69+
## Script-Friendly URLs
70+
71+
[Script-friendly URLs](https://www.oracle.com/java/technologies/jdk-script-friendly-urls/) enable you to download GraalVM from a command line, or automatically in your script and Dockerfile by using a download URL.
72+
Substitute `<version>` and `<architecture>` with the JDK version and `aarch64` or `x64` architecture.
73+
```bash
74+
# Download with wget
75+
wget https://download.oracle.com/graalvm/23/latest/graalvm-jdk-23_macos-<architecture>_bin.tar.gz
76+
77+
# Download with curl
78+
curl https://download.oracle.com/graalvm/23/latest/graalvm-jdk-23_macos-<architecture>_bin.tar.gz
79+
80+
# Download from archive
81+
curl https://download.oracle.com/java/23/archive/jdk-23_macos-<architecture>_bin.tar.gz
82+
```
83+
84+
For other installation options, visit the [GraalVM Downloads page](https://www.graalvm.org/downloads/).
85+
4986
## Installation Notes
5087

5188
### On JAVA_HOME Command
5289
The information property file, _Info.plist_, is in the top level _Contents_ directory.
53-
This means that GraalVM participates in the macOS-specific `/usr/libexec/java_home` mechanism. Depending on other JDK installation(s) available, it is now possible that `/usr/libexec/java_home -v22` returns `/Library/Java/JavaVirtualMachines/<graalvm>/Contents/Home`.
54-
You can run `/usr/libexec/java_home -v22 -V` to see the complete list of JVMs available to the `java_home` command. This command sorts the JVMs in decreasing version order and chooses the top one as the default for the specified version.
90+
This means that GraalVM participates in the macOS-specific `/usr/libexec/java_home` mechanism. Depending on other JDK installation(s) available, it is now possible that `/usr/libexec/java_home -v23` returns `/Library/Java/JavaVirtualMachines/<graalvm>/Contents/Home`.
91+
You can run `/usr/libexec/java_home -v23 -V` to see the complete list of JVMs available to the `java_home` command. This command sorts the JVMs in decreasing version order and chooses the top one as the default for the specified version.
5592
Within a specific version, the sort order appears to be stable but is unspecified.

docs/getting-started/graalvm-community/windows.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@ permalink: /docs/getting-started/windows/
77

88
# Installation on Windows Platforms
99

10-
GraalVM Community Edition is available for Windows on the x64 architecture.
11-
You can install it on Windows from an archive file (_zip_).
10+
GraalVM is available for Windows on the x64 architecture.
11+
We recommend installing GraalVM on Windows from an archive.
1212

13-
Follow these steps to install GraalVM:
13+
* [Installing from an Archive](#installing-from-an-archive)
14+
* [Prerequisites for Native Image on Windows](#prerequisites-for-native-image-on-windows)
15+
* [Other Installation Options](#other-installation-options)
1416

15-
1. Navigate to the [GraalVM Downloads page](https://www.graalvm.org/downloads/). Select **22** for the Java version, **Windows** for the operating system, and download.
17+
## Installing from an Archive
18+
19+
1. Navigate to the [GraalVM Downloads page](https://www.graalvm.org/downloads/). Select **23** for the Java version, **Windows** for the operating system, and download.
1620

1721
2. Change to the directory where you want to install GraalVM, then move the _.zip_ archive file to it.
1822

@@ -99,4 +103,8 @@ To build a project using the [Native Build Tools Gradle plugin](https://graalvm.
99103
gradlew.bat nativeCompile
100104
```
101105

102-
This guide was written for Windows 11, but should be valid for Windows 8 and 10.
106+
This guide was written for Windows 11, but should be valid for Windows 8 and 10.
107+
108+
## Other Installation Options
109+
110+
For other installation options for Windows, visit the [GraalVM Downloads page](https://www.graalvm.org/downloads/).

0 commit comments

Comments
 (0)