 | |
Installing Java
Install the Java Virtual Machine (JVM)
 | Navigate to http://java.sun.com/javase/downloads/ |
 | Find the Installation Instructions for the latest JDK
update (currently JDK 6 update 6; NOT the "with J2EE" NOR the “with NetBeans” download) |
 | Read the Installation Instructions for your Operating System |
 | Return to the download page and click the “Download” button for the
JDK update. |
 | Accept the License Agreement |
 | Then download the latest Java SE Development Kit for your operating system
(for Windows, I recommend the "Windows Offline Installation") |
 | Run the installation program an follow the onscreen default options.
Note the installation directory for the J2SE. |
Set the environment variables (Windows 2000, XP and Vista).
 | Click the “Start” button |
 | Open the “Control Panel” (“Settings >> Control Panel” in Windows 2000) |
 | Select “System” to open up the “System Properties” |
 | Select the “Advanced” tab |
 | Click the “Environment Variables…” button |
 | Create or Update the “JAVA_HOME” variable |
 | In the “System Variables (lower screen), select the “JAVA_HOME” variable if it exists
and click “Edit”. If “JAVA_HOME” does NOT exist, click “New” and type “JAVA_HOME”
(all uppercase with underscore between words) in the “Variable Name” field. |
 | In the “Variable Value” field, replace the existing value (if any) or add the installation
directory where Java was installed (i.e., “C:\Program
Files\Java\jdk1.6.0_06”). |
 | Click “OK” |
 | Update the “PATH” variable |
 | In the “System Variables (lower screen), select the “PATH” variable and click “Edit”. |
 | Click on the “Variable Value” field and press the “Home” key (this positions the cursor
at the beginning of the field). |
 | Insert “%JAVA_HOME%\bin;” in the “Variable Value” field being careful NOT to overwrite
any existing text. Type it exactly as quoted and don’t forget the semicolon after “bin” |
 | Click “OK” |
 |
Create or Update the “CLASSPATH” variable |
 | In the “System Variables” (lower screen), select the “CLASSPATH” variable if it
exists and click “Edit”. If “CLASSPATH” does NOT exist, click “New” and type “CLASSPATH”
(all uppercase with no spaces) in the “Variable Name” field. |
 | If there is an existing “CLASSPATH” value, click on the “Variable Value” field
and press the “Home” key (this positions the cursor at the beginning
of the field). |
 | Insert “.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar” in the “Variable Value”
field being careful NOT to overwrite any existing text. Type it exactly as quoted. Notice
the “.;” (dot semicolon) at the beginning and don’t forget the semicolon after “dt.jar”. |
 | If there is text after “tools.jar”, add a semicolon after “tools.jar” |
 | Click “OK” |
For MACs, Linux or Unix, define and export the environment variables
specified above.
Command line test the compiler and the interpreter.
Trouble?
Open a command line window and type:
set > set.txt
This will create a file in your current directory called “set.txt” that contains the values of
your environment variables. Send an email message including your evening phone number to
jfleming@troy.edu and give me a “stepbystep”
description of what your are doing and any messages or other symptoms about what's wrong. Attach screen
shots, if available, and attach the “set.txt” file. I’ll call you back as soon as possible (usually that evening).
|