How to Download & Install Java JDK 8 in Windows
⚡ Smart Summary
Install Java JDK 8 in Windows by downloading the Development Kit from Oracle, running the installer, and configuring environment variables. This resource explains each download and installation step and how to set the PATH and CLASSPATH so that javac and java run from any command prompt.

This Java Development Kit (JDK) allows you to code and run Java programs. It is possible to install multiple JDK versions on the same PC, but it is recommended to install Java on Windows 10 with the latest version.
How to Install Java for Windows 10 (64-bit)
Following are the steps to install Java in Windows 10, for the JDK 8 free download for 32-bit or JDK 8 download for Windows 64-bit, and installation.
Step 1) Go to this link. Click on JDK Download for the Java JDK 8 download.
Step 2) Next:
- Accept the License Agreement.
- Download Java 8 JDK for your version, 32-bit or 64-bit.
Step 3) When you click on the installation link, the popup will open. Click on “I reviewed and accept the Oracle Technology Network License Agreement for Oracle Java SE Development Kit” and you will be redirected to the login page. If you do not have an Oracle account, you can easily sign up by adding your basic details.
NOTE: You will be required to create an Oracle account to start the Java 8 download of the file.
Step 4) Once the Java JDK 8 download is complete, run the exe to install the JDK on Windows. Click Next.
Step 5) Select the PATH to install Java in Windows. You can leave it as default. Click Next.
NOTE: Follow the on-screen instructions in the succeeding steps to install Java 8 on Windows 10.
Step 6) Once you install Java in Windows, click Close.
How to set Environment Variables in Java: Path and Classpath
The PATH variable gives the location of executables like javac, java, etc. It is possible to run a program without specifying the PATH, but you will need to give the full path of the executable, like C:\Program Files\Java\jdk1.8.0_271\bin\javac A.java instead of a simple javac A.java.
The CLASSPATH variable gives the location of the library files.
Let us look into the steps to set the PATH and CLASSPATH.
Step 1) Right-click on My Computer and select Properties.
Step 2) Click on Advanced system settings.
Step 3) Click on Environment Variables to set the Java runtime environment.
Step 4) Click on the New button of User variables.
Step 5) Type PATH in the Variable name.
Step 6) Copy the path of the bin folder, which is installed in the JDK folder.
Step 7) Paste the path of the bin folder in the Variable value. Click on the OK button.
Note: In case you already have a PATH variable created on 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 the CLASSPATH.
Note: In case your Java installation does not work after installation, change the CLASSPATH to:
CLASSPATH = <JDK installation directory>\lib\tools.jar;
Step 9) Click on the OK button.
Step 10) Go to the command prompt and type the javac command.
If you see a screen like the one below, Java is installed.
Having trouble installing Java? Check our Online Java Compiler.
















