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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

contactkarthiCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ajay-SinghCommented:
> "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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.