CSCE 145: Algorithmic Design I

Installing Java and Java Documentation


Introduction

These instructions are to help you download and install Java on your personal computer. You will install both the Java language and then the documentation for Java. Note that you must install Java before installing Eclipse, and you will need both.

Downloading Java:

1. Log in to an account on your computer that has "Administrator" privileges. For Windows 98 or ME, any account will do.

2. Open Internet Explorer or Netscape, Firefox, Mozilla, or Opera.

3. Go to http://java.sun.com/javase/downloads/index.jsp.

4. Click on the Download button for JDK 6 Update 2 (this is the latest version as of August 21, 2007). We are using Eclipse rather than NetBeans, so you do not need to get the version that includes NetBeans.

5. Accept the license agreement and then click on the link for your platform. For Windows, choose "Windows Online Installation."

Installing Java on Windows Vista, XP, or 2000:

1. If you choose "Windows Online Installation," then click on 'Run' when the window pops up, and then 'Run' again in answer to the IE Security Warning. Accept all of the defaults and suggestions, but make sure that the location where Java will be installed is at the top level of your C: drive. Click on "Finish." You should have a directory (folder) named C:\jdk1.6.0_02, with subfolders C:\jdk1.6.0_02\bin and C:\jdk1.6.0_02\lib

2. Modify your system variable called "PATH" (so that programs can find where Java is located).
Either right-click on the My Computer icon or select "System" on the control panel. When the window titled "System Properties" appears, choose the tab at the top named "Advanced." Then, click on "Environment Variables." In the bottom window that shows system variables, select "Path" and then click on "Edit..." Add C:\jdk1.6.0_02\bin as the first item in the list. Note that all items are separated by a semicolon, with no spaces around the semicolon. You should end up with a path variable that looks something like
C:\jdk1.6.0_02\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\system32\Wbem

3. Modify or create a system variable called "CLASSPATH," as follows.
In the lower "System Variables" pane choose "New..." and type in Variable Name "CLASSPATH" and the value (note that it begins with dot semicolon)
.;C:\jdk1.6.0_02\lib

4. To test Java to see if everything is installed properly, open a command window (a DOS window) and type the command "javac". The result should be information about the Usage of javac and its options. If you get a result that "'javac' is not recognized as an internal or external command, operable program or batch file" then there is a problem and Java will not work correctly.

Installing Java on Mac OS X:

1. Mac OS X ships with Java already installed. You're already done, so move on to installing Eclipse.

Installing Java Documentation

1. Go to http://java.sun.com/javase/downloads/index.jsp.

2. Click on the Download button for Java SE 6 Documentation.

3. Accept the license agreement and then click on the link for your language (English or Japanese).

4. Save the file (named jdk-6-doc.zip) in some directory/folder on your computer, such as in C:\temp or C:\My Downloads.

5. Once the download finishes, find the file using Windows Explorer and double-click on it to unzip it. Extract it to the directory/folder C:\jdk1.6.0_02, which will create the subfolder C:\jdk1.6.0_02\docs