Reputation: 364
I'm getting an error saying:
Unbound classpath container:'JRE System Library [JavaSE-1.8]' in project 'MyProject'
Checking the Execution Environments, eclipse seems unable to find any compatible JREs. I can see that jdk1.8.0_65 is added under Installed JREs.
I can temporarily fix the problem by configuring the projects build path to use the JRE explicitly instead of going through the Execution Environments. The problem however will return once I update the project using Maven.
Maven is pointing to the variable in the Execution Environments. I can't change the Maven configuration because it's used by several teams (and it's working for them). I need the Execution Environments to detect the JDK.
Note: I've noticed that the file C:\workspace.metadata.plugins\org.eclipse.jdt.launching\libraryInfos.xml is always being generated corrupt. Changing this one so it's similar to my colleagues' doesn't fix the problem.
Environment info:
Eclipse - Mars
Windows 7 (x64)
Apache Maven 3.2.5
Note: I've looked at other similar questions on this site but none have been able to answer my question. Their solution is to simply add the JDK under Installed JREs, but in my case that is already done
Upvotes: 4
Views: 1985
Reputation: 11
I had this problem.
Happens when JAVA_HOME in your system settings is set to a different directory than the VM running eclipse.
Either remove JAVA_HOME or add/change the -vm setting in eclipse.ini to match it.
Upvotes: 1
Reputation: 32934
Upvotes: 0