Unbound classpath container in Eclipse

278,592

Solution 1

Given the FAQ, sharing a project file seems have to have advantages and is even recommended practice for Java projects (personally, I would not do that).

Maybe some of the following work for you:

  1. Edit the project's properties (right-click project, Properties, Java Build Path, Libraries, Remove and Add Library.
  2. Import the project's files without the "project file"
  3. Install JDK1.5 from http://java.sun.com/javase/downloads/index_jdk5.jsp and see whether you can fix paths

Solution 2

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

In Eclipse, go to Window -> 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!

Solution 3

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

Solution 4

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.

Solution 5

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.

Share:
278,592
Jessica
Author by

Jessica

Updated on November 25, 2021

Comments

  • Jessica
    Jessica over 2 years

    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.

  • Steph
    Steph over 12 years
    This worked for me. I had to go to Window -> Preferences for the first step, and the very last step is to select your "Workspace default JRE" and click Finish.
  • Ti Strga
    Ti Strga over 11 years
    Yeah, the location of dialogs in Eclipse moved around quite a bit during the last release or two; all of the functionality found in older answers is still there, but the "X->Y->Z" paths are often different.
  • Rajkiran
    Rajkiran almost 10 years
    or 4. goto Properties -> Java Build Path -> Libraries Tab -> Select the erroneous system library -> Edit (On the right) -> Select alternate JRE -> Finish.
  • Voonic
    Voonic over 9 years
    IF would have done more, but i can vote up only once. saved my whole day
  • Ricker Silva
    Ricker Silva about 5 years
    How can I not import the project file? in existing project there is no option for that. I´m very unfamiliar with aclipse
  • The Scientific Method
    The Scientific Method almost 4 years
    actually this should be the answer and its solved the problem, all issues in this problems arise due to reason you gave . +1
  • Nelda.techspiress
    Nelda.techspiress over 2 years
    And ensure you have downloaded and installed the latest version of OpenJDK! Sometimes we need reminders of the basics, even me! 😎