[eclipse] Unbound classpath container in Eclipse

I have checked out a project using Subversive for Eclipse and I am getting the following errors:

  • The project cannot be built until build path errors are resolved
  • Unbound classpath container: 'JRE System Library[jdk1.5.0_08]'

I'm assuming the first error will be resolved as soon as the second one is. I think I need to install JDK 1.5.0_08 and set it as a jre system library for the project but I can't find anywhere to download it - the closest I can get is JDK 1.5.0_22.

If anyone could provide an alternative solution (or a download link for jdk1.5.0_08 I suppose) I would appreciate it.

This question is related to eclipse classpath subversive

The answer is


I got the Similar issue while importing the project.

The issue is you select "Use an execution environment JRE" and which is lower then the libraries used in the projects being imported.

There are two ways to resolve this issue:

1.While first time importing the project:

in JRE tab select "USE project specific JRE" instead of "Use an execution environment JRE".

2.Delete the Project from your work space and import again. This time:

select "Check out as a project in the workspace" instead of "Check out as a project configured using the new Project Wizard"

  1. right click on the project folder go to Properties at bottom
  2. go to Java Build path
  3. click on Libraries tab
  4. select Classpath
  5. click Add Add Library button on right
  6. select JRE System Library and click Next and then Finish
  7. click Apply and Close the error should go away in IDE.

Click on the error message displaying "Unbound classpath container: 'JRE System Library[jdk1.5.0_08]", left click anyd choose quick fix. Under quick, list of possible options will get displated. Choose replace library. Choose the library you installed. Your good to go.


I had the same problem even after installing JDK 1.7. I corrected it by adding the bin directory to my PATH. So I went to

computer>properties>advanced>environment variables

and then added

C:\Program Files\Java\jdk1.7.0_55\bin;

then I followed these instructions

http://clean-clouds.com/2012/12/06/how-to-install-and-add-jre7-in-eclipse/


For those using sdkman, this helped me.

Use Case:
I was using identifier 8.0.202-amzn
I decided to install Azul Zulu as follows: sdk install java 13.0.2-zulu

Error: And then i got this unbound error.

Solution:
1. Right-click on your project in Eclipse/STS
2. Choose Build Path > Configure Build Path...
3. Under Libraries, remove the JRE Library, for my case 8.0.202-amzn
4. Under Libraries, click on Modulepath > Add Library...
5. Choose JRE System Library, click Next
6. Choose Alternate JRE, click on Installed JREs...
7. Your previous configured value should be there
8. If it is there, edit it, if it is not there, add one
9. Make sure the name is: 13.0.2-zulu
10. And the location(JRE home) is: /Users/jumping_monkey/.sdkman/candidates/java/current
11. Click Apply and close
12. Click Finish
13. Voila!

You will see JRE System Library [13.0.2-zulu] in your Project Explorer and all errors gone

Bravo!


This is pretty old question and I recently came across this. Also answers says make sure that you have the correct JDK registered in Installed JRE section of Eclipse properties, and that is it. I had the correct JDK registered and that was marked as default, but still I got this error. There is one more missing piece.

Make sure the in the Installed JREs section the name of your target runtime environment is exactly as it is mentioned in your imported project. For example if the error you get is - Unbound classpath container: 'JRE System Library [JavaSE-1.8]'. Then in Installed JREs you need to have JDK 1.8 registered and its name should be the exact value mentioned in square brackets, which in this case is JavaSE-1.8.


To fix this:

  • Right click your project –> Build Path –>Configure Build Path
  • Select JRE Library and click Edit and from Edit library window choose alternate JRE whatever been configured with your eclipse then click Finish

The problem happens when you

  • Import project folders into the eclipse workspace.(when projects use different Jre).
  • Update or Reinstall eclipse
  • Change Jre or Build related Settings.
  • Or by there is a configuration mismatch.

You get two errors for each misconfigured files.

  • The project cannot be built until build path errors are resolved.
  • Unbound classpath container: 'JRE System Library.

If the no. of projects having problem is few:

  1. Select each project and apply Quick fix(Ctrl+1)
  2. Either Replace the project's JRE with default JRE or Specify Alternate JRE (or JDK).

You can do the same by right-click project-->Properties(from context menu)-->Java Build Path-->Libraries-->select current unbound library -->Remove-->Add Libraries-->Jre System library-->select default or alternate Jre.

Or directly choose Build Path-->Add libraries in project's context menu.


But the best way to get rid of such problem when you have many projects is:

EITHER

  1. Open the current workspace (in which your project is) in File Explorer.
  2. Delete all org.eclipse.jdt.core.prefs file present in .settings folder of your imported projects.(Be careful while deleting. Don't delete any files or folders inside .metadata folder.)**
  3. Now,Select the .classpath files of projects (those with errors) and open them in a powerful text editor(such as Notepad++).
  4. Find the line similar to <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> and replace it with <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
  5. Save all the files. And Refresh or restart Eclipse IDE. All the problems are gone.

OR

Get the JRE used by the projects and install on your computer and then specify it..


I had a similar problem when I recreated my workspace that was fixed in the following way:

Go to Eclipse -> Preferences, under Java select "Installed JREs" and check one of the boxes to specify a default JRE. Click OK and then go back to your project's properties. Go to the "Java Build Path" section and choose the "Libraries" tab. Remove the unbound System Default library, then click the "Add Library" button. Select "JRE System Library" and you should be good to go!


Indeed this problem is to be fixed under Preferences -> Java -> Installed JREs. If the desired JRE is apparent in the list - just select it, and that's it.

Otherwise it has to be installed on your computer first so you could add it with "Add" -> Standard VM -> Directory, in the pop-up browser window choose its path - something like "program files\Java\Jre#" -> "ok". And now you can select it from the list.


In an already configured workspace where it just stopped building:

1. Right click the error
2. Select quick fix
3. Use workspace default JRE

This occasionally happens to me when working in a shared project after updating it with the latest changes. I'm not sure why, maybe their JRE installation path differs slightly from mine somehow.


Examples related to eclipse

How do I get the command-line for an Eclipse run configuration? My eclipse won't open, i download the bundle pack it keeps saying error log strange error in my Animation Drawable How to uninstall Eclipse? How to resolve Unable to load authentication plugin 'caching_sha2_password' issue Class has been compiled by a more recent version of the Java Environment Eclipse No tests found using JUnit 5 caused by NoClassDefFoundError for LauncherFactory How to downgrade Java from 9 to 8 on a MACOS. Eclipse is not running with Java 9 "The POM for ... is missing, no dependency information available" even though it exists in Maven Repository The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. on deploying to tomcat

Examples related to classpath

spark submit add multiple jars in classpath How to resolve this JNI error when trying to run LWJGL "Hello World"? Intellij Cannot resolve symbol on import Eclipse error "Could not find or load main class" "Could not find or load main class" Error while running java program using cmd prompt Caused By: java.lang.NoClassDefFoundError: org/apache/log4j/Logger getting JRE system library unbound error in build path Run a JAR file from the command line and specify classpath How do I resolve ClassNotFoundException? File inside jar is not visible for spring

Examples related to subversive

Unbound classpath container in Eclipse How to change credentials for SVN repository in Eclipse? How do I check out an SVN project into Eclipse as a Java project? Rolling back bad changes with svn in Eclipse