error in eclipse - new to eclipse

Hi,

I installed jdk 1.5 and then I installed eclipse and created a project in it. I then added a java file to the project and I am gettting

"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"

I have attached the screen shot also.

Please help
-anshu
eclipse-error.png
anshumaEngineeringAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
contactkarthiConnect With a Mentor Commented:
have a look at this discussion

http://forum.java.sun.com/thread.jspa?threadID=761856&messageID=4348232

have pasted the 2 options from there for your  convenience

- Right Click on your project
- Properties
- Java Build Path node
- Fix all the bangs, (bangs being errors "!" ) in all of the tabs, especially Libraries


I got this error in a case when there was no actual error in my build path. I finally restarted Eclipse with the -clean command line param and then did a Project->Clean->Clean All Projects and it worked. Doing the Project->Clean before restarting Eclipse with the -clean param didn't help.
0
 
Ajay-SinghConnect With a Mentor Commented:
> "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"
 
This error comes when you have not configured JDK correctly.
Goto Windows->Preferences->Java->Installed JRE
Click on add button there and
on "JRE home directory" select the java 5 installation root.
and check that jre entry on the last page.
0
 
anshumaEngineeringAuthor Commented:
The JRE was not added in  the lib files. i think this is one more issue that might cause this.

thanks for all the help
0
All Courses

From novice to tech pro — start learning today.