The project was not built since it build path is incomplete. Cannot find the class file for Java.lang.Object
(2007-08-29 10:13:56)
Reproduced
Error message: The project was not built since it 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 fromrequired. class files
This was the problem today when eclipse3.2+myeclipse5.1+tomcat5.5 was redeployed. It took a long time to find the reason. Solutions written to share:
The reason for the above error is that it was loaded with a jdk5 when the JRE was installed. Eclipse will automatically refer to your JRE path when it builds the project, but there is no way to load multiple versions.
Workaround:
1. Go to window \ preferences \ java \ installedjres
1) Press Add
2) Enter JRE Name, example JDK 1.5.0.09
3) JRE Home directory, select the path to install
4) Press OK
2. Go to project \ Properties \ Java Bulid Path
1) ADD Library
2) Select JRE System library and press Next
3) Select Workplace default JRE and press Finish ...
That's all.
The project was not built since it build path is incomplete. Cannot find the class file for Java.lang.Object