COMP1100 Introduction to Programming and Algorithms
Semester 1, 2006

Hints on Installing Java under Windows

Where do I get Java?

From Sun's Java website: http://java.sun.com/. The site may look a bit daunting, but here's what to do:
  1. navigate your way to download Java 2 Platform Standard Edition 5.0 (J2SE5.0) at http://java.sun.com/j2se/1.5.0/download.jsp. You don't need the (enormous) Enterprise Edition, Java EE 5.
  2. Follow the link to Download JDK 5.0 Update 6 (unless a later update has come along in the meantime). Accept the licence agreement and choose the Windows Offline Installation (about 60Mb).
  3. Download and run to install. You might also like to look at the installation instructions at the same time.
Once you have successfully installed the Java SDK, there is still some work to do. Read on ...

Setting the PATH and CLASSPATH on Windows XP

  1. Click on Start
  2. Under Settings, click on Control Panel
  3. Click on the System icon
  4. Click on the Advanced tab
  5. Click on Environment Variables button
  6. Highlight PATH in the top panel and click the Edit button

    Don't change what's there -- you are going to add to the PATH value

  7. Edit the PATH so it begins with C:\Program Files\Java\jdk1.5.0_06\bin;
    (assuming you have installed J2SE5.0 update 6 in the default location) and click OK

    You have now set your PATH variable to find javac and java commands at the DOs prompt.

    You also need to set up a CLASSPATH variable to tell Java where to look for classes. It must include the current directory.

  8. If you already have a CLASSPATH variable, edit it as above so it begins with .\;

    If you do not have a CLASSPATH variable, create one as follows:

  9. Click on the New button below the top panel
  10. For Variable name type CLASSPATH
  11. For Variable value type . (a single period)
  12. Click OK

  13. Click OK to exit System Properties
  14. Close the Control Panel
  15. Restart your computer
  16. Test your installation by opening a DOS window to check that both the javac and java commands are recognised.

Last modified: Thu May 18 12:10:17 EST 2006