Unbound classpath container in Eclipse
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!
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
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
.
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:
- Edit the project's properties (right-click project, Properties, Java Build Path, Libraries, Remove and Add Library.
- Import the project's files without the "project file"
- Install JDK1.5 from http://java.sun.com/javase/downloads/index_jdk5.jsp and see whether you can fix paths