Note that there are some explanatory texts on larger screens.

plurals
  1. POStarting Java applet directly from jar file
    primarykey
    data
    text
    <p>The goal is to have an applet run from a jar file.</p> <p>The problem is that the applet only seems to want to run from an exploded jar file.</p> <p>Samples on the Internet suggest this applet tag:</p> <pre><code> &lt;applet code="com.blabla.MainApplet" archive="applet.jar" width="600" height="600"&gt; </code></pre> <p>This will not even try to look in the jar file and fails with:</p> <pre><code>Caused by: java.io.IOException: open HTTP connection failed:http://localhost:8080/helloWord/com/blabbla/MainApplet.class at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 7 more </code></pre> <p>Setting the codebase instead of the archive attribute to the jar file. Looks a bit better. However, the JVM does not realize that it has to open the jar file:</p> <pre><code> &lt;applet code="com.blabla.MainApplet" codebase="applet.jar" width="600" height="600"&gt; Caused by: java.io.IOException: open HTTP connection failed:http://localhost:8080/helloWord/applet.jar/com/blabbla/MainApplet.class at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 7 more </code></pre> <p>How does the applet tag have to be formulated to start an applet class from <em>inside</em> of a jar file?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload