Installing JDK on Windows

12 December 2011 By Praveen Macherla 20,642 views 3 Comments
1 Flares Twitter 0 Facebook 1 Google+ 0 1 Flares ×

Environment Used

  • Java SE 6 Update 29
  • Windows (XP/Vista/7) OS

Downloading Java Development Kit (JDK):

You can download latest version of JDK from this location

http://www.oracle.com/technetwork/java/javase/downloads/index.html

Click on the download link to go to the download page.

Download the JDK suitable for your system requirement (Windows x86 for 32bit windows or Windows x64 for 64bit windows) to a safe location on your machine.

Installing Java Development Kit (JDK):

Step 1:

Double click the downloaded JDK exe file. Click the “Next” button.

Step 2:

The “Custom Setup” window allows you to select which parts of the JDK you want to install. If you want to change the installation directory click on change and specify the location where jdk will be installed. It is recommended to stick with the default settings. Click the “Next” button.

Step 3:

JDK “installing” window appears. It will take a few minutes to install the program features of the JDK.

Step 4:

By installing JDK, JRE will also be installed. Select Java Runtime Environment (JRE) installation location.

Step 5:

When the “Complete” screen appears, click on the “Finish” button. Now you have successfully installed the Java Development Kit!

Configuring the installed JDK on Windows:

The installed JDK must be configured to the windows environment so that the Java compiler (javac) and runtime (java) becomes available for compiling and running the Java application from any location on Windows.

NOTE: If JDK is not configured on windows environment then to compile and run your Java applications you must place them in <JAVA_HOME>/bin/ folder.

For Windows Vista/7:

  1. Click on Start -> Right click Computer -> Select Properties
  2. Click on “Advanced system settings” from left side Tasks menu.
  3. Click on “Advanced” tab and click on “Environment Variables…”.
  4. NOTE: For earlier Windows version:
    Right click “My Computer” -> Select “Properties” -> “Advanced” tab and click on “Environment Variables…”
  5. Select Path variable from “System variables” and click on “Edit…” and go to the end of the “Variable Value” and place a semi-colon (;) and add “<Your JDK installation folder>\bin” path as shown below.
  6. Click OK -> OK -> OK. Now you have successfully configured JDK and ready to develop applications in Java.
  7. Now open Command prompt and type “javac -version” and it should show the version number which you installed.

javac is the primary Java compiler, included in the Java Development Kit (JDK).

Also type “java -version” which is Java runtime included in JDK. Sometimes you may want to restart the computer for the PATH settings to take effect.

Done! If you haven’t encountered any problems, then the installation and configuration is complete.

Tags: , , ,