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

NoClassDefFoundError

 
kelvin cheung
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.lang.NoClassDefFoundError: javaapplication1/Client
Exception in thread "main"
Java Result: 1


what does this mean?
 
Horatio Westock
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

It looks like you might not have you CLASSPATH correct. Try reading this article about how to set the classpath.
 
Rick O'Shay
Ranch Hand
Posts: 531
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never use CLASSPATH. Use -classpath. If you set CLASSPATH, something might change it on you later. It's pointless to rely on that when it's trivial to supply the classpath with a switch. Furthermore, in most hello-world examples you are better off NOT setting CLASSPATH or -classpath. Then you learn that the current directory is the classpath by default.

How many more CLASSPATH questions? Oh, probably another 10,000,000 or so going forward.
 
Rick O'Shay
Ranch Hand
Posts: 531
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BTW, the information on that link is terrible. Too bad somebody doesn't update it with more and more accurate information in less space.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic