错误提示:The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project.
The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
加载网上下载的开源项目时,出现了上述错误,原因是eclipse在加载项目时会自动根据jre路径加载jar包,但是有多个版本存在是就会出现报错。
解决方法:
1. 进入window \ preferences \ java \ Installed JREs
1)按Add
2)JRE home directory, 选择安装的路径
3)输入JRE Name
4)按OK
2. 进入Project \ properties \ Java Bulid Path
1)Add library
2)选JRE System Library后按Next
3)选workplace default JRE后按 finish...