OpenJDK 17 download and install
In this article, we will understand how to download OpenJDK 17 and install it on Windows operating system, set JAVA_HOME and start working with it.
Head over to this link to download OpenJDK 17. This page will look as below
Click on the link as per the desired operating system and it will download the corresponding file.
For Windows, it will download a compressed zip file.
Install OpenJDK 17
Once the zip is downloaded, extract it to a preferred location on the file system.
Folder structure after it is unzipped will look as below
Setting Java Home
For setting Java home on Windows, we need to set JAVA_HOME environment variable.
Follow below steps to set it:
- Open Control Panel and search for “environment” as shown below
Click on “Edit environment variables for your account”. - In the window that appears, add a new variable with name “JAVA_HOME” and its value as the path where the OpenJDK zip was extracted.
Path should be till the parent of bin folder, it should not include bin as shown below.
If there is already a variable with name JAVA_HOME present, then click on Edit to update its value. - Next edit Path variable and add an entry %JAVA_HOME%\bin as shown below
- Press OK.
Check OpenJDK 17 installation
Open Command Prompt and type
java –version
Press enter. You should see below output
openjdk 17.0.1 2021-10-19
OpenJDK Runtime Environment (build 17.0.1+12-39)
OpenJDK 64-Bit Server VM (build 17.0.1+12-39, mixed mode, sharing)
which shows OpenJDK 17 is installed successfully on your Windows system.