• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTML questions

 
Joe Wolf
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found a URL that has the answers I'm looking for
http://www.cse.ucsc.edu/~mcnab/embedding.html
 
Joe Wolf
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic