• 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

why .class cannot be loaded?

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have an applet in the html page and browser cannot load class.
did anybody have this problem ?
it's weird but the .class does exist and is in
the same directory as the html file.
any ideas ?
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have a look in the Java console and see why it's not loading.
It may be finding it ok, but it's throwing an unahndled exception.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I too had same problem.check your HTML code properly.May be you are missing something.
Inside Applet tag give your class file name in code parameter and comment the whole html code if you are writing in Source Code.
I hope it may solve your problem
chitra
[This message has been edited by chitra ratnawat (edited May 25, 2001).]
[This message has been edited by chitra ratnawat (edited May 25, 2001).]
 
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a similar problem with one of my clients. We have an applet that works fine everywhere we test it EXCEPT at this particular client in which they get the same message you are reporting. We haven't confirmed it yet, but I think they need to upgrade their Microsoft Virtual Machine. Just a thought for you to look into...
------------------
I'm a soldier in the NetScape Wars...
Joel
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also there are often problem with things that work fine in IE not loading in Netscape and visa versa. Checking the console is step one.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well, the NT console says
# Applet exception: error: java.lang.NoClassDefFoundError: javax/swing/JApplet
java.lang.NoClassDefFoundError: javax/swing/JApplet
at java.lang.ClassLoader.defineClass(Compiled Code)
at netscape.applet.AppletClassLoader.loadClass(Compiled Code)
at netscape.applet.AppletClassLoader.findClass(Compiled Code)
at netscape.applet.AppletClassLoader.loadClass1(Compiled Code)
* at netscape.applet.AppletClassLoader.loadClass(Compiled Code)
at netscape.applet.AppletClassLoader.loadClass(Compiled Code)
at netscape.applet.DerivedAppletFrame$LoadAppletEvent.dispatch(Compiled Code)
at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code)
at java.awt.EventDispatchThread.run(Compiled Code)
at netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled Code)
although it's running if i use appletviewer
 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Swing classes, including JApplet, won't work in most browsers. You'll need the plug-in from Sun:

http://java.sun.com/products/plugin/index.html
 
reply
    Bookmark Topic Watch Topic
  • New Topic