This page was last updated June 7, 2008


Installing Java on your computer


If you will only be using a computer in one of the Computer Science department labs then you do not have to do anything. Java has already been installed on those computers.
If you are using a Macintosh for this course you do not have to do anything to install Java. It is part of the Mac OS. You will, however, need to ensure that you are using at least Mac OS 10.4 or later.
If you want to install and use Java on your own computer running the Microsoft Windows OS then follow the directions below.
If you want to install and use Java on your own computer running the Linux OS then follow the directions below.

Download the Java installer from Sun.

Step 1
Open an internet browser and go to this web site: http://java.sun.com/. Note: If you click on this link you will be directed away from this page and won't be able to see these directions so you probably will want to open another instance of your browser and use it to do the downloading.

When you have reached the link at Sun you will see the page shown below. Move your mouse over Downloads. A dropdown menu will appear and you will see the following. Move your mouse down until Java SE is highlighted then click the left mouse button. FYI: The "SE" stands for "Standard Edition."

Note: The other parts of this display have probably changed since the above image was captured.


Step 2
Click the Download button to get the JDK. FYI: The "JDK" stands for "Java Developer Kit." The other parts of this display may have changed since the image below was captured, and the update number is probably different. That's OK, just click the button.



Step 3
A page similar to the one below should appear. From the Platform drop down box select your platform type (Linux or Windows). You may have an option in the Language drop down box, but the last time I checked the only option was "Multi-Language". That's OK. Click the check box next to the "I agree..." line, and finally click the Continue button.


Step 4
The page seen below should appear. Read the instructions then click the check box next to the "...Offline Installation" line, then click the link just below that line. It should look similar to the blue text saying "jdk-6u6-windows-i586-p.exe" or the appropriate name for the Linux download. You could also click the "Download Selected with Sun Download Manager" button if you want. It really doesn't matter as long as you get the file downloaded. (Note: the name may not be exactly the same. Sun changes the names of the download file with amazing rapidity.)



If you are working on a Windows platform you will see a warning dialog box similar to the one below. Click the Save button then, using the Save File Dialog box that will appear, select a location on your hard drive to save the installer file. The process for a Linux platform is similar.



Step 5
After the installer file finishes downloading you can close the browser with the link to Sun.

Double click the installer executable and follow the instructions it will display to install Java. If you encounter any problems installing Java see the Instructor or one of the lab assistants in the Computer Science PC lab.

Step 6
Setting the PATH environment variable.

This has been done on the machines in the Computer Science department labs.
On a Macintosh
  • This has been done for you on a Macintosh.
On a PC running Windows
  1. Locate where the installer put the Java Developer Kit. This will most likely be in something like C:\Java\jdk1.6.0_06 and you should see a bin directory in this location. That is the path you will want to enter in the places described below.
  2. Now do one of the following depending on the version of your operating system:
    1. Click Start and select Control Panel. In the dialog box that appears double click System.
    2. If you don't see Control Panel when you click Start then select Settings->ControlPanel->System.
    3. If you are running Windows Vista then fight your way through the Vista crap till you get to the point where you can selected the Advancedoption in the list on the left, and tell Vista that "Yes" you really do want to change things.
  3. In the System Properties dialog box click the Advanced tab.
  4. Click the Environment Variables button.
  5. If all of the buttons below the lower list are grayed out then you are not logged in as an administrator so do the following:
    • Click PATH in the upper list and verify that the installer added the path that you found in step 1. The PATH should be something like "C:\Java\jdk1.6.0_06\bin;." You may have to click the edit button just below so you can scroll back and forth to see what is in the string. If you don't see this included then click in the variable value text field, use the arrows keys to move the cursor to the end of the string. Type a semicolon then type the path like the one shown above at the end of the string and don't forget to include the final semicolon and period.
    • If you don't see PATH then click the new button. In the dialog box that appears give the variable the name PATH and set its value to the path where you found the bin directory. Again don't forget to include the final semicolon and period.
  6. If all the buttons below the lower list are not grayed out the you can set the path so that everyone using that machine will have everything set up. To do this, do the following:
    • Click Path in the lower list and verify that the installer added the path that you found in step 1. The PATH should be something like "C:\Java\jdk1.6.0_06\bin;." You may have to click the edit button just below so you can scroll back and forth to see what is in the string. If you don't see this included then click in the variable value text field, use the arrows keys to move the cursor to the end of the string. Type a semicolon then type the path like the one shown above at the end of the string and don't forget to include the final semicolon and period.
  7. Click OK until all the System dialog boxes disappear.
  8. If you are running Vista you may have to restart your machine.
Now, don't you wish you had bought a Mac?

On a Linux system
  • If you are using a Linux system then chances are that you are a Geek and already know how to check and set environment variables so be sure Path has been set like in the description for Windows above.




You are now ready to enter the fascinating and fun world of Java programming.