In this short tutorial, we’re going to take a close look at how to install Java on Windows 10.

We’ll first start with a little insight into how to download Java. Then, we’ll explain how to install it on Windows 10. Then, we’re going to see how to properly set JAVA_HOME environment variable.

Lastly, we’ll highlight different ways to check Java and JDK versions on Windows 10.

So, let’s get started!

Download Java for Windows 10

In this section, we’re going to cover in-depth all the steps required to download Java for Windows 10.

As a matter of fact, downloading Java is a piece of cake! It’s just a matter of a few clicks and simple one-time steps.

First, we need to visit the official Oracle download page and choose the right release for the Java SE Platform.

At this point in time, the latest version is Java SE 14.0.2.

Secondarily, we need to click on the JDK Download link:

download Java Windows 10 step 1

Bear in mind that Oracle has dropped the support for 32 bit. As a result, we can use Java SE only in 64 bit.

For instance, Oracle offers two options to install Java on Windows: through a .zip file and a .exe executable file.

Next up, let’s choose the Windows x64 Installer option:

download Java Windows 10 step 2

Then, we have to accept the Oracle Technology Network License Agreement for Oracle Java SE to proceed to the next step:

download Java Windows 10 step 3

Lastly, a simple click on the download button will do the job:

download Java Windows 10 step 4

Easy, right?

Install Java on Windows 10

Now that we download Java for Windows 10, let’s see how to install it! Basically, the process of installing Java on Windows 10 is pretty simple.

In general, we don’t need to change anything during the installation, we can go with the default settings and follow the suggested instructions.

Firstly, we need to double click on the downloaded installer file to start the installation process:

Install Java Windows 10 step 1

Secondarily, we click Next to continue:

Install Java Windows 10 step 2

Note that, “C:\Program Files\Java\” is the default Java installation folder! However, we can always change it if we want that.

Then, we keep hitting Next until the installation is complete:

Install Java Windows 10 step 3

Lastly, once the Java Windows 10 installation process is finished, we can close the installer.

Set Java Path in Windows 10

Now that we known how to install Java on Windows 10, it’s time to proceed to the next step.

In this short chapter, we’re going to dive deep into how to set JAVA_HOME environment variable on Windows 10. Please note that, JAVA_HOME should point to a JDK folder not JRE.

The basic idea behind setting the Java Path is to make all the Java commands like java, javac… accessible from everywhere. That way, we can run Java programs from anywhere.

First, let’s open the Advanced System Settings. To do that, we just need to press Windows key + Pause Key. Alternatively, we can type View advanced system settings in the search box.

Once the System Properties window is opened, we click on Environment Variables:

Set up Java Path on Windows 10 step 1

Secondarily, we click on New button to create a new System variable with JAVA_HOME as name and the path to the JDK directory as value:

Set up Java Path on Windows 10 step 2

As we can see, the JAVA_HOME environment variable should point to the JDK folder which C:\Program Files\Java\jdk-14.0.2 is in our case.

Set up Java Path on Windows 10 step 3

Next, we need to update the Path variable by adding a new entry for %JAVA_HOME\bin%:

Set up Java Path on Windows 10 step 4

Finally, we can click OK to save and apply the changes.

That’s all we can say about downloading and installing java on windows 10. Now, we’re ready to write our first Java program.

Check Java Version on Windows 10

There are multiple ways that we can use to check Java version on Windows 10. Basically, when we say Java version, we mean JRE version.

The most obvious and basic way is to use the terminal. Firstly, press Win+R and type cmd to open the Command Prompt. After that, type java -version and press Enter:

Check Java Version on Windows 10 method 1

The output means that Java is properly installed on our Windows 10 machine.

Alternatively, we can type “Java” in the search box and click on “About Java”:

Check Java Version on Windows 10 method 2

Please bear in mind that multiple versions of Java can be installed on the same machine. So, when we install Java on Windows 10, it’s better to find out which version is configured in the system classpath.

We can also use javac -version to verify the version of the installed JDK:

Check JDK Version on Windows 10

Finally, let’s open a new command prompt and type in:

    
        C:\Users\ELITEONE>echo %JAVA_HOME%
        C:\Program Files\Java\jdk-14.0.2
        C:\Users\ELITEONE>
    

As we can see, the environment variable JAVA_HOME points to the right directory: C:\Program Files\Java\jdk-14.0.2

Another important thing to note is that the JDK version can be different from the JRE version on the same machine.

Conclusion

In this article, we’ve explained how to tackle the challenge of downloading and installing Java on Windows 10. Then, we’ve seen how to set up the Java path and check the installed version of Java.

Thanks for reading. Have a nice day!