• Post Reply Bookmark Topic Watch Topic
  • New Topic

NoclassDefFoundError for JApplet

 
Raj Devaraj
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following code from Deitel and deitel
import java.net.*;
import java.util.*;
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.applet.AppletContext;

public class SiteSelector extends JApplet {
... rest of the code

It compiles without error. When I try to load the HTML file, I get the following error.
Apple SiteSelector error: java.lang.NoClassDefFoundError:javax/swing/JApplet
When I checked the class heirarchy, api docs etc., everything looks alright. Do I have to set something in the browser?. Any help is appreciated.
Thanks
Raj
 
deekasha gunwant
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi raj,
to run swing applets in browser u need to have plugin.
what u can do is download html converter from sun's site. and convert ur html file using that converter.
once it is converted,after that whenever u try to see that html page it will download the plugin from sun's site directly and u'll be able to see ur JApplet working.
regards
deekasha
 
Raj Devaraj
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Deekasha,
Thanks. I will try that.
Raj
 
Paper has not yet been outlawed – so let your Java Swing application print with wild abandon: JPDF
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!