This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Applets and the fly likes HTML questions Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Applets
Reply Bookmark "HTML questions" Watch "HTML questions" New topic
Author

HTML questions

Joe Wolf
Ranch Hand

Joined: Jul 05, 2001
Posts: 42
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.
Joe Wolf
Ranch Hand

Joined: Jul 05, 2001
Posts: 42
I found a URL that has the answers I'm looking for
http://www.cse.ucsc.edu/~mcnab/embedding.html
Joe Wolf
Ranch Hand

Joined: Jul 05, 2001
Posts: 42
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
Joe Wolf
Ranch Hand

Joined: Jul 05, 2001
Posts: 42
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.
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

Code base examples can be found from these links.
http://web2.java.sun.com/docs/books/tutorial/applet/appletsonly/data.html
http://web2.java.sun.com/docs/books/tutorial/applet/appletsonly/html.html - all the way at the bottom.
HTH.
- satya

Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: HTML questions
 
Similar Threads
Applet Not Initialized
simple applet won't run
Tomcat, JSP and Applet
Applet with custom classes
Is swing worth the trouble?