How to install Java JDK 11 on Windows 10

In this blog post I will show you how to setup Java JDK version 11 on Windows 10. Java 11 is currently released as Long Term Support (LTS) and a recommended version for development. Java 8 is the most widely used today, but it is better to target Java 11 for development as it is production ready and has a long time support.

Option 1- Install using Windows installer

Step 1- Run the installer (.exe file)

Lets get the process started by executing the installer by double clicking the .exe executable installer file that you have downloaded from the official website.

You will see the the following windows.

Windows Installer – Preparing to Install

Java 11 Installation – Setup Wizard

Click on next to continue

Step 2 – Custom setup

In this screen you can change certain installation defaults. I accept this as it is. You can change the installation directory if you want by clicking on change. Click next to continue.

Please remember the installation directory path. This will be required to set the environment variables

Java 11 JDK Installation Wizard – Custom Setup

Click Next to begin the installation

Step 3 – Installation begins

You will that the installation begins. Please wait for the process to complete.

Java 11 JDK Installation progress

After sometime you will see installation complete message.

Java JDK 11 Installation Complete

Click on close to complete the installation.

Note: Earlier, this method used to setup the environment variable also. But with Java 11 JDK, the installer did not setup the environment variable, which I had to add manually. After the installation process completes, run java –version command in command prompt. If you see an error message, end of the blog has the steps required to add environment variables to your computer.

Option -2 – Install using extracting the .zip file

This is pretty straight forward process.

Step – 1 – Download the zip file

Download the .zip file from the official site.

Step – 2 – Unblock the file

Windows 10 blocks the files you have downloaded from internet by default for security reasons. Sometimes when you extract these blocked files, all the extracted files are also blocked and will not execute. Its better to unblock it before extracting it.

Right click on the downloaded zip file and click on properties. Check unblock at the bottom and click OK.

Java 11 JDK – Unblock Zip File

Step – 3 – Extract the downloaded file

Extract the download .zip file which will have the name something like , to any folder such as c:/java.

You can use 7zip or Windows default unzip program. To use the windows default unzip program, right click on the zip file and select Extract All.

Step – 4 – Execute java command from command line

Now you can execute java code using the command line. For this you will have to go to the extracted file root folder. for example C:\java and execute the command from command line.

cd C:\javajava --version

Add Java Path to the environment variable

If you want to run the Java command from anywhere, its better to add it in the path variable. This is how you would do it.

Step 2- Add to Environment path variable

Under System variable – click on path and click edit

Windows 10 – Environment variable

Click on New, and add the java directory’s bin folder path such as c:/java/bin or C:\Program Files\Java\jdk-11.0.2\bin. This will change based on where you have extracted the .zip file(option 2) or installed java(option 1). If you have used the default settings, Java will be installed in the C:\Program Files\Java\ folder.

Click on ok continue and exit.

Now you can run Java command from any where.

Step 3- Check the version of Java installed

Go to windows terminal cmd or powershell and run the command

java --version to check the version of Java installed.

Command Prompt – Check Java Version

That’s it, now you have Java JDK installed on your system.
Thanks you…

Underneath a boring IT professional lies a passionate student of computer science. I love computers and this blog is about everyday computer issues that a common man faces. Through this blog I try to reconnect with my long forgotten self.