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.
Step 2: After the Java JDK download is complete, run the exe for install JDK and Click Next

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

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

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.

Step 2: Click on Advanced system settings.

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

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

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

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

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

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.

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

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.

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”