How do I write HTML tags for an applet that imports classes from another jar in another package?

From: Ding (wuliaoren2_at_yahoo.com)
Date: 06/30/04


Date: 30 Jun 2004 12:28:07 -0700

What I did was like this:

<applet name="MyApplet" code="com.ding.MyApplet.class"
        codebase="./dev/main/bld" archive="applets.jar"
        codebase="./dev/main/lib" archive="comm.jar"
          width="10%" height="10%" mayscript>
</applet>

I imported some classes in comm.jar to MyApplet, but they are not in
the same path as MyApplet, so the applet could not be inited because
it can't find the classes in comm.jar. If I copy comm.jar to bld
directory and include the jar file in archive, it'll find it. But they
shouldn't be in the same directory. What should I do? Please help.



Relevant Pages

  • Re: Different compilers = Different byte code?
    ... > Error loading class: MyApplet ... The "NoClassDefFoundError" means the JVM in the browser isn't even seeing ... installed your applet. ...
    (comp.lang.java.programmer)
  • Re: Applet faild to load from local http address
    ... Sounds like you dont have Sun JVM turned on for MSIE. ... > Error loading class: MyApplet ... > 2- Netscape and Opera work get Applet fine for above address. ...
    (comp.lang.java.programmer)
  • Applet faild to load from local http address
    ... Im trying to load a test.html document contains Applet from my ... Error loading class: MyApplet ... 2- Netscape and Opera work get Applet fine for above address. ...
    (comp.lang.java.programmer)
  • Re: Whats wrong with this incredibly simple applet???
    ... difference in terms of just starting the applet itself should it? ... Myapplet rather than MyApplet (or possibly ... but an SSCCE that fails in the way you describe. ... Andrew Thompson ...
    (comp.lang.java.programmer)
  • Re: Problem with IE and Applets.
    ... If it is 'myapplet', ... alt as 'jChatBox Client Applet'? ... > and run there applet it's work. ...
    (comp.lang.java.programmer)