Cannot find the class file for java.lang.Object. Fix the build path then try building this project

开发的时候,有时候会遇到这个问题:

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

解决方法是,在编译路径中增加JRE System Library。如果已经存在,可以先删除原有的再添加。
Properties->Java Build Path->Add Library... ->add "JRE System Library"

没有更多推荐了,返回首页