• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NoClassDefFoundError

 
Tim Dinkel
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get the 'Java.lang.NoClassDefFoundError: MyClass' when I try to run my applet.
Why??
I declare the class MyClass in the same file as my applet.
like:

This compiles fine but when I try to run it I get the error.
Any suggestions?
[ January 15, 2004: Message edited by: Tim Dinkel ]
 
Alex Belt
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you jar the class files up? Since you're using an inner class, is it deployed to the same directory on the web server as the main class?
 
Tim Dinkel
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No I just compile it to one .class file.
Since they are inner classes they are all in this file, right?
Im rather new in the Applet buissnes, so please tell me what I could do.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look more closely: each inner class goes into its own .class file.
 
Tim Dinkel
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see, indeed they do.
All I should need to do now is to place all the .class files on the webserver?
 
Tim Dinkel
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And....Tuchdown!!!
Thanks alot
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic