In this short tutorial, nosotros're going to have a shut look at how to install Java on Windows x.

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 ready JAVA_HOME environment variable.

Lastly, nosotros'll highlight different means to cheque Java and JDK versions on Windows ten.

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 Coffee for Windows ten.

Every bit a matter of fact, downloading Java is a piece of cake. It's just a affair of a few clicks and simple one-time steps.

First, we demand 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 16.0.1.

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

download Java Windows 10 step 1

Bear in listen that Oracle has dropped the support for 32 bit systems. As a issue, we can apply Java SE only in 64 fleck machines.

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

Next upward, allow'south choose the Windows x64 Installer option:

download Java Windows 10 step 2

And so, we have to take 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 push volition practise the job.

Piece of cake, correct?

Install Java on Windows 10

At present that nosotros download Java for Windows 10, permit's see how to install it. Basically, the process of installing Java on Windows x is pretty piece of cake and simple.

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

Firstly, nosotros 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 go on:

Install Java Windows 10 step 2

Annotation that, "C:\Program Files\Java\" is the default Java installation binder! However, nosotros tin can always change it if we desire that.

Then, we keep hitting Side by side until the installation is complete:

Install Java Windows 10 step 3

Finally, nosotros close the installer window once the installation of JDK is complete on our Windows x.

Set up Java Path in Windows x

Now that we known how to install Java on Windows 10, it'southward time to continue to the next pace.

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

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

First, let's open the Advanced System Settings. To practice that, we just need to printing Windows central + 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, nosotros click on New button to create a new System variable with JAVA_HOME as proper name and the path to the JDK directory every bit value:

Set up Java Path on Windows 10 step 2

As we can see, the JAVA_HOME environment variable points to the JDK folder which C:\Program Files\Java\jdk-xvi.0.ane is in our example.

Set up Java Path on Windows 10 step 3

Side by side, we need to update the Path variable past 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 nosotros tin can say nearly downloading and installing java on windows x. Now, we're fix to write our first Java program.

Cheque Java Version on Windows 10

In that location are multiple means that we tin utilize to check Java version on Windows ten. Basically, when we say Java version, nosotros mean JRE version.

The about obvious and basic way is to use the concluding. Firstly, press Win+R and blazon cmd to open up the Command Prompt. After that, blazon java -version and press Enter:

                      C:\Users\Asus>coffee -version         java version "16.0.1" 2021-04-20         Java(TM) SE Runtime Environment (build 16.0.1+9-24)         Java HotSpot(TM) 64-Bit Server VM (build 16.0.1+ix-24, mixed mode, sharing)          C:\Users\Asus>                  

The output means that Java is properly installed on our operating system.

Alternatively, we tin type "Java" in the search box and click on "Nigh Java":

Check Java Version on Windows

Delight deport in heed that multiple versions of JDK tin be installed on the same on Windows x machine. So, it's important to brand sure the JAVA_HOME environment variable points to the right JDK release.

Permit's open up a new control prompt and type:

                      C:\Users\Asus>echo %JAVA_HOME%         C:\Programme Files\Java\jdk-16.0.1          C:\Users\Asus>                  

As prove above, the environment variable JAVA_HOME points to the directory of the lastest JDK version.

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

                      C:\Users\Asus>javac -version         javac 16.0.1          C:\Users\Asus>                  

Some other important thing to note is that the JDK version can be dissimilar from the JRE version on the same auto.

Please go on in mind that we need e'er to bank check for new Java updates and install them to go along our machines up-to-date with the latest releases.

In case you desire to check how to enable Java on Chrome and other browsers, feel free to take a look at this article: https://devwithus.com/enable-java-chrome/

Conclusion

In this article, we've explained how to tackle the challenge of downloading and installing Java on Windows 10. And so, we've seen how to add JAVA_HOME and append %JAVA_HOME\bin% to the Path.

Lastly, we have showcased how to verify and check the installed Java version.

Thank you for reading. Take a nice day!