Installation on Windows Platforms
You can install GraalVM Community Edition on the Windows operating system from an archive file (zip). Follow these steps:
- Navigate to the GraalVM Releases repository on GitHub. Select Java 11 based or Java 17 based distribution for Windows, and download.
- Change the directory to the location where you want to install GraalVM, then move the .zip archive file to it.
- Unzip the archive to your file system.
- There can be multiple JDKs installed on the machine. The next step is to configure the runtime environment. Setting environment variables via the command line will work the same way for Windows 7, 8, and 10.
- Point the
PATHenvironment variable to the GraalVM
setx /M PATH "C:\Progra~1\Java\<graalvm>\bin;%PATH%"
- Set the
JAVA_HOMEenvironment variable to resolve to the GraalVM installation directory:
setx /M JAVA_HOME "C:\Progra~1\Java\<graalvm>"
Note that the
/Mflag, equivalent to
-m, requires elevated user privileges.
- Point the
- Restart Command Prompt to reload the environment variables. Then use the
following command to check whether the variables were set correctly:
echo %PATH% echo %JAVA_HOME%
Alternatively, you can set up environment variables through a Windows GUI:
- Go to Windows Start Menu - Settings - … - Advanced.
- Click Environment Variables. In the section System Variables find the
JAVA_HOMEvariable and select it.
- Click Edit.
- Click New.
- Click Browse and reach the folder to add. Confirm by clicking OK.
- Restart Command Prompt to reload the environment variables.
Repeat the same for the
PATH environment variable.
For Oracle GraalVM Enterprise Edition users, find the installation instructions here.
Installation Note #
To run GraalVM Community Edition based on OpenJDK 8u292 on a Windows platform, the MSVCR100.dll redistributable package needs to be installed (for more details, see issue #3187).
Supported Functionalities #
Prerequisites for Using Native Image on Windows #
On Windows, Native Image requires Visual Studio Code and Microsoft Visual C++(MSVC). You can use Visual Studio 2017 version 15.9 or later. There are two installation options:
- Install the Visual Studio Code Build Tools with the Windows 10 SDK
- Install Visual Studio Code with the Windows 10 SDK
The last prerequisite is the proper Developer Command Prompt for your version of Visual Studio.
On Windows, the
native-image tool only works when it is executed from the x64 Native Tools Command Prompt.
Step-by-step instructions on installing Visual Studio Build Tools and Windows 10 SDK, and starting using Native Image can be found here.