I've been trying to test out a Swing applet I've been able to compile the applet but not run it from a webpage. I was looking at other people's HTML and I've noticed some things such as CODEBASE pointing to .jar files in the APPLET tag, the EMBED tag, and recently the OBJECT tag (since APPLET has deprecated or something). So my questions are, what tags should I use and what is the difference between CODE and CODEBASE? I think part of my web browser problems, like "java.lang.NoClassDefFoundError: javax/swing/JApplet" in Netscape Communicator 4.7 (with the Java 1.2 plugin installed) and "load: class Editor not found" in IE 5 (plugin installed), are resulting from incomplete HTML tags. Thanks for your help.
Despite copying the HTML code and Java code exactly from http://www.cse.ucsc.edu/~mcnab/label.html I am unable to get the applet to run on my server. I get 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) in my Netscape Java Console when I try to load the page the applet is called from. Any insight into what I need to do to get this to work? -Joe
posted 19 years ago
I downloaded the JRE 1.3 and it has taken care of my javax error...but now I'm getting a "Applet exception: class LabelTest could not be loaded" error.