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
- Start up Eclipse. You'll probably be told that your Java
program has errors in it; that's what you're about to fix.
- Select Window -> Preferences.
- Select Java -> Installed JREs.
- Press the Add... button.
- Set the "JRE name" and "JRE home directory" as specified in
this picture:

"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.
- Press the OK button.
- Click on the checkbox by "J2SE 5.0" in Preferences dialog.
- Press the OK button.
If that doesn't fix things, try this:
- Select Window -> Preferences.
- Select Java -> Compiler.
- Select 5.0 from the "Compiler compliance level".
- Press OK.
Finally, if things are still not quite right, try this:
- Select your project in the Package Exporer.
- Right click on your project.
- Select Properties...
- Select Java Build Path in the selection on the left.
- Choose the Libraries tab on the right.
- Select the 1.4 library, and hit Remove.
- Press Add Library.
- Select JRE System Library, and press Next.
- 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:
- The exact error message.
- The exact output of these commands:
unix-% echo $PATH
unix-% echo $JAVA_HOME
|