Eclipse Installation and Use

For Williams CS 134 Students

This document answers questions particularly related to the use of Eclipse in CS 134 at Williams College. The official Eclipse FAQ is available from

  1. How do I install Eclipse on my own computer?
  2. How do I create a new project?
  3. How can I add an image or sound file to a project?
  1. How do I install Eclipse on my own computer?

    There are several things you need to do to install Eclipse on your computer:

    1. (You may skip this step if you already have a Java SDK on your computer. MacOS X comes with a Java SDK installed.) Download and install Java from You should get either the most recent release or a release that is consistent with what we are using in the Mac lab. (In Spring 2004, we are using 1.4.1.) Be sure to get the SDK (not the JRE or the NetBeans bundle) and to select a version for your operating system.
    2. Download and install Eclipse from Be sure to get the latest Stream Stable Build for your operating system.
    3. Download objectdraw.jar from Remember where you download this because you will need to tell Eclipse where it is.
    4. Start Eclipse.
      • Open the Window menu and select Preferences.
      • Click on the icon to the left of Java to expand the Java choices.
      • Select Classpath Variables.
      • Click the New button.
      • For the name, enter OBJECTDRAW. Be sure to spell it exactly and in all capitals.
      • For the Path, click the File button and find the objectdraw.jar file you just downloaded.
      • Click OK and OK again.

  2. How do I create a new project?

    1. Open the File Menu. Select New and then Project.
    2. Select Java, then select Java Project, and then Next.
    3. Enter the Project name.
    4. If you are not planning to use objectdraw, click Finish and skip the rest of the steps. If you are planning to use objectdraw, click Next.
    5. Select the Libraries tab.
    6. Click Add variable.
    7. Select OBJECTDRAW from the list and click OK.
    8. Click Finish.

  3. How can I add an image or sound file to a project?

    The following technique can be used to import any type of file into an Eclipse project, not just image and sound files. The files will be copied into the project.

    1. Select the project to import the file(s) into in the Project Explorer panel.
    2. Open the File menu. Select Import. Select File system. Click Next.
    3. Click the Browse button. Find the folder containing the files to import. Select Choose.
    4. Click on the folder name (not the check box) in the left column.
    5. Select the files to import in the right column.
    6. Click Finish.