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.

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

3. Go to http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u27-download-440405.html.

4. Accept the Oracle Binary Code License Agreement for Java SE and click on the Download button for Java SE Development Kit 6u27 (for me this was the one labeled jdk-6u27-windows-x64.exe, which is the latest version as of August 22, 2011) and it has all of the features we will need.

5. Your browser might state that the download has been blocked. You should click on this message and choose "allow download." In the window that pops up, choose "Run".

Installing Java on Windows 7 or Vista:

1. After you click on 'Run', 76.81MB (or 67.4MB for x64) will be downloaded to your computer. In the subsequent pop-up windows, click on "Next" several times to accept the default installation. Click on "Finish." You should have a directory (folder) named C:\ProgramFiles\Java\jdk1.6.0_27, with subfolders C:\Program Files\Java\jdk1.6.0_27\bin and C:\Program Files\Java\jdk1.6.0_27\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" or in Control Panel click on "Advanced system settings." Then, click on "Environment Variables." In the bottom window that shows system variables, select "Path" and then click on "Edit..." Add C:\Program Files\Java\jdk1.6.0_27\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:\Program Files\Java\jdk1.6.0_23\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:\Program Files\Java\jdk1.6.0_27\lib

4. To test 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://www.oracle.com/technetwork/java/javase/downloads/index.html.

2. Under "Additional Resources," click on the 'Download Zip' button for Java SE 6 Documentation.

3. Select your language (English or Japanese), accept the license agreement, and click on "continue."

4. To get the documentation for Java, go to http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-doc-download-355137.html and click on the link jdk-6u25-fcs-bin-b04-apidocs-04_Apr_2011.zip. Save the file (named jdk-6u25-fcs-bin-b04-apidocs-04_Apr_2011.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:\Program Files\Java\jdk1.6.0_27, which will create the subfolder C:\Program Files\Java\jdk1.6.0_27\docs