How to Download and Install Java JDK in Windows 10

You will learn how to download and install Java JDK and set up the java environment on your Windows 10, so it allows you to code and runs Java programs.

Steps to Download and Install Java JDK on Windows

Here are the steps to install Java in Windows 10 for JDK free download for 32 bit or JDK download for Windows 64 bit, and we will tell you the installation process.

Step 1: First, you want to need to download java JDK from the oracle website. The download link is given below.

Download Java JDK From oracle

Step 2: After the Java JDK download is complete, run the exe for install JDK and Click Next

Install java step 1

Step 3: Select the PATH to install Java in Windows. You can leave it Default, then click next.

Install java step 2

Step 4: After the installation of Java in windows then click Close. Your java JDK is successfully installed on your pc; the next step is set the Environment Variables in Java

Install java image 3

Steps to set Environment Variables in Java (Path and Classpath)

The PATH variable provides executable locations such as Javac, Java, etc. It is possible to execute a program without specifying the path but must provide the executable’s full path as C:\Program Files\Java\jdk1.8.0_271\bin\javac A.java instead of simple javac A.java.

The ClassPath variable gives the location of the library files. Let’s see the steps to set the PATH and CLASSPATH.

See Also: How to download Windows 11 on your PC and laptop

How to set Environment Variables in Java (Path and Classpath)

The PATH variable provides executable locations such as Javac, Java, etc. It is possible to execute a program without specifying the path but must provide the executable’s full path as C:\Program Files\Java\jdk1.8.0_271\bin\javac A.java instead of simple javac A.java.

The ClassPath variable gives the location of the library files. Let’s see the steps to set the PATH and CLASSPATH.

Step 1: Right-click on My computer/This pc and click on the properties.

 set Environment Variables in Java step 1

Step 2: Click on Advanced system settings.

set Environment Variables in Java step 2

Step 3: To set Java runtime environment Click on Environment Variables.

 set Environment Variables in Java step 3

Step 4:  Click on the new button of the user variable.

 set Environment Variables in Java step 4

Step 5: Type PATH in the field Name of the variable.

set Environment Variables in Java step 5

Step 6: Copy the path of the bin folder, which is installed in the JDK folder.

 set Environment Variables in Java step 6

Step 7: Paste Path of bin folder in Variable value field then Click on OK Button.

set Environment Variables in Java step 7

Note: In case you already have a PATH variable created in your PC, edit the PATH variable to

PATH = <JDK installation directory>\bin;%PATH%;

Here, %PATH% appends the existing path variable to our new value.

Step 8: You can follow a similar process to set CLASSPATH.

set Environment Variables in Java step 8

Note: In case you java installation does not work after installation, change classpath to

CLASSPATH = <JDK installation directory>\lib\tools.jar;

Step 9: After all the steps finished then Click on OK button

set Environment Variables in Java step 9

Step 10: Go to the command prompt and type javac commands. If you see a screen like this, then Java JDK is installed in windows.

set Environment Variables in Java step 10

Video on Install Java JDK on Windows 10

I hope you understand the process to download and install Java JDK on Windows 10. If you like it, then share it on social media. If you have any queries about the topic, then say us in a comment.

1 thought on “How to Download and Install Java JDK in Windows 10”

Leave a Comment