Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (3.9k points)

I am getting the following error after importing a project in Eclipse:

The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files

However, I have set the path as C:\Program Files\Java\jdk1.6.0_41 in Eclipse Kepler, through Window » Preferences » Java » Installed JREs

1 Answer

0 votes
by (46k points)

his is an irritating Eclipse Bug which appears to bite now and then. See http://dev-answers.blogspot.de/2009/06/eclipse-build-errors-javalangobject.html for a possible solution, unless try the following;

  • Close the project and resume it.
  • Clean the project (It will restore the buildpath hence reconfiguring with the JDK libraries)

OR

  • Delete and Re-import the project and if required do the above steps again.

The better cure is to try NetBeans rather of Eclipse :-)

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Aug 26, 2019 in Java by Krishna (2.6k points)
0 votes
1 answer
asked Aug 13, 2019 in Java by Nigam (4k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

30.5k questions

32.6k answers

500 comments

108k users

Browse Categories

...