• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NoclassDefFoundError for JApplet

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Deekasha,
Thanks. I will try that.
Raj
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic