File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NoClassDefFoundError

 
kelvin cheung
Ranch Hand
Posts: 120
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic