今天重装eclipse,新建Java Project文件后自动报错,两个errors:1.The project cannot be built until the build path errors are resolved ,2.Unbound classpath container: 'JRE System Library,在网上找到了一次性的解决方法,mark一下。
错误图如下:
翻译 未绑定的类路径容器:JRE 系统库 [jre1.6.0_11] 的项目 'abc'
也就是说项目的JDK和IDE使用的JDK版本不一致,造成未绑定的状态
-----------解决方法-----------------------------------
1、在错误工程上单机右键,选择 Properties 或者 直接选择菜单上Project -> Properties
2、选择 Java Build Path -> Libraries
3、有问题的JDK(可能还会有tomcat),后面括号中都有unbound的提示
4、选择Edit 或者 Remove (如果已经有一个正确的JDK存在了就选remove )
5、选择OK,就可以了
来源博客:http://heisetoufa.iteye.com/blog/849363