title: Applet ClassNotFoundException after signing jar with certified key and all-permissions
body: <p>I have Java7 update 45. I am testing a small test applet packaged in a jar file that I am trying to load via an HTML page as:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;html&gt;
   &lt;body&gt;
    &lt;applet code="SmallApplet" archive="appTable89Signed.jar" codebase="." width=500 height=500&gt;
      &lt;param name="permissions" value="all-permissions" /&gt;
    &lt;/applet&gt;
   &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The jar file manifest has the Permission attribute and its value is "all-permissions". When I sign the jar file with a certified key, I get the <code>ClassNotFoundException</code>. Looking at tomcat access log as well as out from Java Console, I see the <code>SmallApplet</code> class is being loaded from the web application URL.</p>
  
  <pre><code>network: Connecting http://xxxxxx:8085/testappletsigning/SmallApplet.class with proxy=DIRECT
  </code></pre>
  
  <p>Followed by the exception</p>
  
  <pre><code>java.lang.ClassNotFoundException: SmallApplet
      at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  basic: load: class SmallApplet not found
  </code></pre>
  
  <p>If I use a self-signed and import it as a trusted certificate then the exception disappears.</p>
  
  <p>The only way I can use a certified key to sign a jar, appears to be by using "sandbox" permissions both in the jar manifest and the applet tag. </p>
  
  <p>Is there an explanation for this behavior?</p>