aspose file tools*
The moose likes Beginning Java and the fly likes why .class cannot be loaded? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "why .class cannot be loaded?" Watch "why .class cannot be loaded?" New topic
Author

why .class cannot be loaded?

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
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 ?
mick barry
Greenhorn

Joined: Apr 30, 2001
Posts: 16
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.

-------------------------<BR>http://www.objects.com.au
chitra ratnawat
Greenhorn

Joined: May 24, 2001
Posts: 6
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).]
Joel Cochran
Ranch Hand

Joined: Mar 23, 2001
Posts: 301
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


Wait a minute, I'm trying to think of something clever to say...<p>Joel
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
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.


"JavaRanch, where the deer and the Certified play" - David O'Meara
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
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
Angela Lamb
Ranch Hand

Joined: Feb 22, 2001
Posts: 156
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why .class cannot be loaded?