Java SDK
Download: java.sun.com/javase/downloads/index.jsp
Chances are very good the Java that came with your computer is out of date and may well be only the Java Runtime Environment (JRE). Download and install a newer version of the Java JDK (Java Development Kit). You must install the JDK -- which includes the javac compiler for compiling Java code -- not just the JRE. In fact, the JDK includes a JRE in its directory structure and installs it in the main Java directory (see the screen capture at right). Download a JDK Version 6u11 by choosing one of the options on the download page. I chose the Java SE Development Kit.
The next page will ask you to pick your operating system and accept the license agreement. The following page will have the download link. Using the Sun Download Manager is optional. It is helpful if you need to interrupt and restart the download.
After the download completes, accept the defaults and install it at C:\Program Files\Java\jdk1.6.0_11. Make the changes in the System environment variables (described in the next paragraph) to point to this installation. You can install it elsewhere but you must adjust your JAVA_HOME and Classpath variables to accurately reflect the actual location. Multiple versions of the JDK can be on the same workstation -- what counts is the directory pointed to by the environment variables.
JAVA_HOME
After installing Java go to Control Panel --> System --> Advanced --> Environment Variables. Enter a new system variable in the bottom half of the pane named "JAVA_HOME" and set the value to the drive location (C:\Program Files\Java\jdk1.6.0_11 is the default). While you've got the environment window open, update the PATH variable to include the C:\Program Files\Java\jdk1.6.0_11\bin location. Remember to add a semi-colon to the current path before making the addition. Restart the workstation for the environment variable changes to take effect.
|
|
|
Quick Test
Test your setup by opening a command prompt (Start Program --> Run --> enter “cmd”). In the DOS Command box that opens, type “java -version” and check for a result similar to the capture below and documenting the installed Java version as 1.6.0_11. The bad result is an error message saying Java couldn't be found.
Then type in “java -help” in the Command box and check for a result like the capture below. If one or both of these tests don't work check your JAVA_HOME and PATH variable settings. Everything else depends on these settings so there's not much reason to continue until these variables are set correctly.
|