• Post Reply Bookmark Topic Watch Topic
  • New Topic

NoClassDefFoundError when running Swing Applet

 
Ian Morris
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have used Sun's Forte IDE to generate a SWING Applet. It compiles with no errors, however, when I try and execute it within the IDE I get the following error:
java.lang.NoClassDefFoundError: web-inf/classes/JApplet (wrong name:JApplet)
When trying to run the applet via a browser I get the following error:
java.lang.ClassNotFoundException: ..JApplet
I have loaded Sun's plugin 1.3.1_01 and can run Sun's helloSwingApplet. What am I missing on my server???
I have searched on Javaranch for this error but cannot find any references, I would be gratefull if someone could point me in the right direction.
Thanks.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure about the Forte error, but to fix the browser error you will have to run htmlconverter on the HTML page you are launching your applet from. This lets the browser know you want to run your applet through the Java 2 Plug-In rather than the old browser JVM. You can download htmlconverter from Sun, and they should have some instructions on how to use it.

-Nate
 
Ian Morris
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nate,
Thanks, my SWING applet is working fine now. I did read Sun's information on the HTML Converter but was not sure if I needed it, I guess I did.
I am new to Applet's (I have written servlets in the past), and think, at the moment, that using SWING is not as easy and convenient as I had first hoped, maybe that will change as I practice more.
Thanks.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using Swing will be tough for a while with applets... until either the browsers standardize and upgrade their JVMs ( ) or all users download the Java 2 Plugin ( )

-Nate
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!