In this post, I’d like to share with you how to download and install OpenJDK for Java 16 on Windows operating system. OpenJDK is a distribution of Java Development Kit (JDK) under open-source license GPL. And Java 16 is a version of Java SE platform, which was released on March 2021.

Note that OpenJDK doesn’t come with an installer and you have to update the system PATH environment variable.

 

1. Download Binary Distribution of OpenJDK 16

Go to the official homepage of OpenJDK 16, and click on the link for downloading a zip file for Windows/x64, as shown below:

OpenJDK 16 download page

It will download the file name openjdk-16.0.1_windows-x64_bin.zip. And I recommend you verify SHA256 checksum of the downloaded file, by typing this command in a command prompt window:

certutil -hashfile openjdk-16.0.1_windows-x64_bin.zip SHA256

Then compare the hash value produced by this command, against the value published on the website:

733b45b09463c97133d70c2368f1b9505da58e88f2c8a84358dd4accfd06a7a4

If they are identical, it’s safe to use the downloaded zip file.

 

2. Install OpenJDK 16 on Windows



Extract the downloaded zip file on to a separate directory on your computer, say D:\OpenJDK16. And then you have the installation directory of OpenJDK 16 is D:\OpenJDK16\jdk-16.0.1. Then you need to update the system environment variable JAVA_HOME:

JAVA_HOME=D:\OpenJDK16\jdk-16.0.1

Follow this post to know how to set JAVA_HOME on Windows. And ensure that the system environment variable PATH does contain an entry of JAVA_HOME\bin.

Open a new command prompt window, and type java –version, you should see the following output:

OpenJDK version 16

That means you have successfully installed OpenJDK 16 on your Windows computer. Enjoy experimenting the new features of Java 16, which includes Pattern matching for instance of operator and Records.

To watch the steps of installing OpenJDK 16 in action, kindly 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