Last Updated on 12 June 2021   |   Print Email
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: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:
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: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:
Nam Ha Minh 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.