Set Up Java Development Environment (JDK) on Windows
Go to http://java.sun.com/javase/downloads/index.jsp, and select the latest JDK. As of the writing of this article, the latest JDK version is JDK 6 Update 14.
Once the installation package is downloaded, double click to start the installation process. You can keep all the default settings such as default JDK installation path. Go to C:\Program Files\Java\. You should see all the Java installations in this directory. There should be a jdk1.6.0_13 directory.
Next, we need to set up the system environment variables for JDK. Go to “Start”->”Control Panel”.
Then select “Performance and Maintenance”.
Select “System”.
Select the “Advanced” tab and then click the “Environment Variables” button.
From the System variables list, select “Path” variable and click “Edit”.
Append ;C:\Program Files\Java\jdk1.6.0_13\bin to the end of the Path value. Then click OK to save.
Next, we need to create or edit JAVA_HOME environment variable. Search for JAVA_HOME from the System variables list. If JAVA_HOME is not found, click “New”. Then enter “JAVA_HOME” for variable name and “C:\Program Files\Java\jdk1.6.0_13” (default JDK installation directory). Then click “OK” to save.
If JAVA_HOME exists, click “Edit” button to edit the variable value. Change the variable value to C:\Program Files\Java\jdk1.6.0_13 and then click OK.