Explains all the steps required to install OpenJDK 12 on Windows.

How To Install OpenJDK 12 On Windows
How To Install OpenJDK 12 On Windows
May 04, 2019

This tutorial explains all the steps required to install OpenJDK 12 on Windows 10. The steps to install OpenJDK 12 on other versions of Windows should be similar to the steps explained in this tutorial.

You can also follow the steps to install Java 10, and Java 11 published by Tutorials24x7. You can also follow the detailed steps required to install OpenJDK 12 on Ubuntu.

Notes: JDK 13 is about to release on 17th Sept 2019. You may follow What's New In Java 13 to know about the new features introduced in JDK 13.

Download OpenJDK

Open the JDK 12 GA Release site and download the distribution for Windows as highlighted in Fig 1.

Download OpenJDK 12

Fig 1

Click on the zip download link to download OpenJDK for Windows. Also, verify your download using the given sha256 checksum.

Install OpenJDK

Extract the downloaded zip to the desired location. In my case, I have extracted the downloaded zip to C:\java\java-12. The zip extractor will extract the files to C:\java\java-12\jdk-12.0.1.

This is only step required to install OpenJDK on windows.

Set Environment Variables

In this step, we will configure the environment variables in order to use the OpenJDK from Command Prompt. Open Command Prompt and check the installed version of Java using the command java -version as shown in Fig 2.

Check Java Version

Fig 2

It shows the version of Java 8 since my current version of Java is 8. In your case it might show another version of the Java if it's already installed, else it will show the message - Java is not recognized as internal or external command, operable program or batch file.

Right Click -> My Computer(This PC) -> Properties -> Advanced System Settings

The above steps will open the Windows settings panel as shown in Fig 3.

Advanced System Settings

Fig 3

Now click on Environment Variables, select Path under System Variables section and click on Edit. We need to add the path of installed JDK to system Path.

Click on New Button and add the path to installed JDK bin which is C:\java\java-12\jdk-12.0.1\bin in our case. It should look like the one shown in Fig 4.

Environment Variable

Fig 4

Press OK Button 3 times to close all the windows. This sets the JDK 12 on system environment variables to access the same from the console.

Notes: Remove existing PATH values specific to previously installed Java. Also update JAVA_HOME, in case it was already set.

Now again open the console and test the Java version as shown in Fig 5.

Check Java Version

Fig 5

It must show the OpenJDK version as shown in Fig 5.

These are the easy to install steps required to install OpenJDK on Windows.

Write a Comment

Click on the captcha image to get new code.
Discussion Forum by DISQUS