In this article, I will show you how to setup OpenJDK 17 on Windows operating system. You know, OpenJDK is a production-ready, open-source distribution of Java Development Kit (JDK). And JDK 17 is the latest Long Term Support (LTS) release of Java SE platform, as of October 2021.

 

1. Download binary distribution of OpenJDK 17

Head over to the official download page of OpenJDK at https://jdk.java.net/17, and click on the link for Windows/x64:

open jdk 17 download page

It will download the binary distribution of OpenJDK 17 as a ZIP archive file. Then you should type the following command to verify the SHA256 checksum of the downloaded file:

certutil –hash openjdk-17_windows-x64_bin.zip SHA256

Compare the SHA256 value produced by this command against the value posted on the website, in the corresponding sha256 link. If they are identical, it’s safe to use the downloaded zip file.

 

2. Install OpenJDK 17 on Windows

Extract the zip file into a directory on your computer, e.g. D:\OpenJDK17. Then you need to update the JAVA_HOME environment variable, pointing to the installation directory of OpenJDK 17, e.g. D:\OpenJDK17\jdk-17. Also make sure that the PATH variable does include an entry to JAVA_HOME’s bin folder:

setx –m JAVA_HOME “D:\OpenJDK17\jdk-17”

setx –m PATH “%JAVA_HOME%\bin;%PATH%”

Note that you must execute these commands with administrator right. Follow this article to learn more.



Then open a new command prompt and type java –version to verify:

openjdk java version

If you see this screen, it means that OpenJDK 17 has been successfully installed.

To see the steps in action, watch the following video:

 

Learn more:


About the Author:

is certified Java programmer (SCJP and SCWCD). He started programming with Java in the time of Java 1.4 and has been falling in love with Java since then. Make friend with him on Facebook and watch his Java videos you YouTube.



Add comment

   


Comments 

#3Nam2022-11-11 18:29
To Rouilier: Just ignore that message.
Quote
#2Guy Rouillier2022-11-11 04:59
Java.net claims "JDK 17 has been superseded. Please visit jdk.java.net for the current version."

I'm confused by this, since Java 17 is a long term support release.
Quote
#1JH2022-03-19 15:49
On windows 10, powershell as admin:

setx /m JAVA_HOME “D:\OpenJDK17\jdk-17”

setx /m PATH “%JAVA_HOME%\bin;%PATH%”

note /m, not -m as indicated in article
Quote