Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse: Frustration with Java 1.7 (unbound library)

Tags:

java

eclipse

ide

I'm having trouble with a brand new project in a brand new installation of Eclipse. Repro steps:

  1. Download this version of Eclipse: http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/heliosr

  2. Unzip to c:\program files\eclipse java

  3. Launch Eclipse; choose a workspace

  4. File > New > Java Project

  5. Project name: Hello World. JRE: "Use an execution environment JRE: JavaSE-1.7"

  6. Hit Next, go to the Libraries tab. The only entry is JRE System Library [JavaSE-1.7] (unbound). What does "unbound" mean? How do I fix it?

  7. Hit Finish.

Expected: Brand new project works fine.

Actual: There are two errors:

The project cannot be built until build path errors are resolved HelloWord  Unknown Java Problem Unbound classpath container: 'JRE System Library [JavaSE-1.7]' in project 'HelloWord' HelloWord  Build path Build Path Problem 

What am I doing wrong here?

Update: Perhaps I don't actually have the Java 7 JDK on my machine. How can I be sure?

Update 2: Looks like Java 7 is in fact not out yet. Sweet.

like image 204
Nick Heiner Avatar asked Aug 22 '10 15:08

Nick Heiner


People also ask

What does unbound mean in Eclipse?

Usually it means that the classpathentry in the . classpath can't be resolved. I usually see this when opening a project that was created/updated with a different plugin (or version) defining the classpath container that is unbound.


1 Answers

1) Find out where java is installed on your drive, open a cmd prompt, go to that location and run ".\java -version" to find out the exact version. Or, quite simply, check the add/remove module in the control panel.

2) After you actually install jdk 7, you need to tell Eclipse about it. Window -> Preferences -> Java -> Installed JREs.

like image 189
Yoni Avatar answered Sep 20 '22 11:09

Yoni