Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to use old java projects in new eclipse installation

Tags:

java

eclipse

I did an upgrade of my windows OS and restored my eclipse workspace from my backup. Now, when I try to open any of the older projects, they complain with a message:

Unbound classpath container: 'JRE System Library [jre6]' in project <ProjectName>

When I looked around, I found pages which suggest that I change the JRE version for the project. However, I have about 50 projects in this workspace and do not want to change the value for each of them.

Any suggestions would be welcome.

Thanks and regards,

Karthick S.

like image 620
Karthick S Avatar asked Sep 14 '26 11:09

Karthick S


2 Answers

You should add a new JRE and name it [jre6] (or rename your current JRE). That will prevent you from changing manually your 50 projects. Window -> Preferences -> Java -> Installed JREs -> Add...

like image 125
Kai Avatar answered Sep 17 '26 00:09

Kai


The problem is that if you backed up the eclipse project files, then these contain information regarding paths to your JRE or JDK install and any external jars (specific to your last install). There are 2 files that you can edit with any text editor to fix this problem .classpath and .project.

Other option would be to delete the classpath and project files and try to import the project as java project using File > Import.

like image 36
Ali Avatar answered Sep 17 '26 00:09

Ali



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!