Calvin seal CS 108: Introduction to Computing
Spring 2006

Eclipse Problems

Some of you might have trouble using the latest version of Java with Eclipse. This page should give you instructions on how to fix this.

Your Changes

  1. Start up Eclipse. You'll probably be told that your Java program has errors in it; that's what you're about to fix.
  2. Select Window -> Preferences.
  3. Select Java -> Installed JREs.
  4. Press the Add... button.
  5. Set the "JRE name" and "JRE home directory" as specified in this picture: Adding a JRE
    "Use default system libraries" should be checked already; the list of JAR files below that should fill in automatically when the "JRE home directory" is entered.
  6. Press the OK button.
  7. Click on the checkbox by "J2SE 5.0" in Preferences dialog.
  8. Press the OK button.

If that doesn't fix things, try this:

  1. Select Window -> Preferences.
  2. Select Java -> Compiler.
  3. Select 5.0 from the "Compiler compliance level".
  4. Press OK.

Finally, if things are still not quite right, try this:

  1. Select your project in the Package Exporer.
  2. Right click on your project.
  3. Select Properties...
  4. Select Java Build Path in the selection on the left.
  5. Choose the Libraries tab on the right.
  6. Select the 1.4 library, and hit Remove.
  7. Press Add Library.
  8. Select JRE System Library, and press Next.
  9. Select a 1.5 library, and press Finish.

Eclipse may ask if you want to recompile your projects; you do. If it doesn't ask, but your still have problems, you can run Project -> Clean..., and clean your projects which will do the same thing.

Reporting Problems

If you still run into problems with Eclipse, there are a few things we need to know:

  1. The exact error message.
  2. The exact output of these commands:
    unix-% echo $PATH
    unix-% echo $JAVA_HOME