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.

Download OpenJDK 17
Head over to this link to download OpenJDK 17. This page will look as below
download and install openjdk 17
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
openJDK 17 folder structure
Setting Java Home
For setting Java home on Windows, we need to set JAVA_HOME environment variable.
Follow below steps to set it:

  1. Open Control Panel and search for “environment” as shown below
    setting environment variableClick on “Edit environment variables for your account”.
  2. 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.
    setting java home windows
    If there is already a variable with name JAVA_HOME present, then click on Edit to update its value.

  3. Next edit Path variable and add an entry %JAVA_HOME%\bin as shown below
    setting java home in path windows
  4. 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.

Hope the article was useful.

0
Liked the article ? Spread the word...