Install JDK on Microsoft Windows

Install OpenJDK using installer

You can to following link and download binary package of different versions of java

https://jdk.java.net/archive/

You can download the latest version for example from here
(https://download.java.net/java/GA/jdk12/33/GPL/openjdk-12_windows-x64_bin.zip)

Install Oracle JDK

You have two options to install Oracle JDK on Windows: Manually or using Installer. You can install Oracle JDK by downloading it from here:
https://www.oracle.com/technetwork/java/javase/downloads/index.html

Install Oracle JDK Manually

Pick one of JDK versions from above link and look for and look for a file with jdk-xx.xx_xx_windows-x64_bin.zip format.
Make sure you accept Oracle License Agreement by checking Accept License Agreement radio button if you are OK with that. By default Decline License Agreement is selected and if you click the files listed there, it does not let you to download it.

After you download it, follow the instructions I explained for OpenJDK manual installation.

Install Oracle JDK using Installer

You can install Oracle JDK using Microsoft Installer bundle. In the same page that I explained above you can find an .exe file.

After downloading it, run it and follow its wizard to install it.

01

Image 1 of 4

If you already set JAVA_HOME or PATH environment variables and set them to a specific JDK path, make sure you set them to the JDK that is installed by installer.

Using java -version you can check your default JDK. As you see here it is pointing to my OpenJDK I installed

Set JAVA_HOME and PATH variables, to Oracle JDK path

After clicking OK on all opened dialogs for setting JAVA_HOME and PATH variables, make sure you closed and reopen Command Prompt or Powershell terminals, then type java -version, and you should be able to see Oracle JDK 12 installed known as Java HotSpot 12.0.1 version like this.

Leave a Reply