Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipse, NoClassDefFoundError: java/lang/Object

 
Irene Db
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can compile project (yes, rt.jar is included in the classpath), but getting exception when running or debugging:
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
What could it be?
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What version of Eclipse are you using, and on what operating system platform? And what Java version?
Have you created the simplest possible application and tried that?
Have you tried to unzip the Eclipse distribution one more time and trying it again from scratch?

By the way Irene, would you please take a look at JavaRanch's Naming Policy and change your displayed name accordingly.
Thanks,
-Barry
 
Dom Rodrigues
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eclipse is not able to find tools.jar due to conflicting JREs and/or SDK. Add $JAVA_HOME/lib/tools.jar to the and build classpath. Hope that helps
 
C. Nimo
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eclipse lost its JRE definition.
in your project->properties->build path
select the 'libraries' tab, and then the button 'add library'
from there - add your jre and press ok.
If 'ok' is disabled - there's some sort of a collision. read the
line at the top of the window to find out what you need to remove.
hope this helps.
nimo.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic