LOADING

Type to search

Tools

Install JDK on Windows – Step By Step

Share

JDK – Java Development Kit is a software development environment used for developing Java applications and applets.  It includes the Java Runtime Environment (JRE), an interpreter/loader (java), a compiler (javac), an archive (jar), a documentation generator (javadoc) and other tools needed in Java development.

Download JDK

  • You need to download the Java Development Kit first of all.
  • Under “Java Platform, Standard Edition” ⇒ “Java SE 8u{xx}”, where {xx} is the latest update number ⇒ Click the “JDK Download” button.
  • Look for the latest “Java SE Development Kit 8u{xx}” ⇒ Then check “Accept License Agreement”.
  • Choose the Java Development Kit for your operating system, e.g., “Windows x64” (for 64-bit Windows OS) or “Windows x86” (for 32-bit Windows OS). You can check whether your Windows OS is 32-bit or 64-bit via “Control Panel” ⇒ (Optional) System and Security ⇒ System ⇒ Under “System Type”.

Install the JDK

Run the downloaded .exe file, which installs Java Development Kit and also Java Runtime Environment. Both are installed into “C:\Program Files\Java”.

Default Installation Folder

Figure 1. Default installation folder.

Setup Java System Variables

Once Java is installed, the system variables need to be set up. To do this, go to System Properties and setup system variables on environmental variables window.x
“Control Panel > System and Security > System” and select “Advanced System Settings” link.

Adv System Settings

Figure 2. Advanced system settings.

Click on “Environmental Variables” button on “System Properties” window.
Environmental Variables

Figure 3. Environmental Variables.

This opens Environmental Variables window. Next, click on “New” button under “System variables” section.
New System variables

Figure 4. New System variables.

In the popup window, enter “Variable name” as “JAVA_HOME” and “Variable value” as a path to the existing jdk installation folder on your system. This is the path for jdk, not the jre.
Java JDK Path

Figure 5. Java JDK path

Java_Home

Figure 6. JAVA_HOME.

After entering the details, click on “OK” button, which will create an entry for “System variables” as below.
JAVA_HOME variable

Figure 7. JAVA_HOME variable.

Next, search for “path” variable under “System variables” section and click on “Edit” button.
Path Variable

Figure 8. Path variable.

Add “%JAVA_HOME%\bin” to end of “Variable value”. Make sure this string is separated from the previous entries by a semicolon, and click on “OK” button.
Java Bin path in Path variable

Figure 9. Java Bin path in Path variable.

Next, close all open windows by clicking the “OK” buttons. Open a command prompt window and type “java –version”. This is to check whether the java setup has been set up properly.
Verify Java version

Figure 10. Java version verification.

The java –version command displays the version of the jdk and jre installed. Therefore confirming that java is installed and system variables setup properly.
The setup steps need to be repeated in error message.
Conclusion

Figure 12. Java version.

Now you can install Eclipse for start java programming

Leave a Comment

Your email address will not be published. Required fields are marked *