title: Java applet running all-perminssions gets BlockedException: User has denied the privileges to the code
body: <p>I'm about to build a website where we'll use a java applet. To be able to do everything we need we want  to run the applet in all-permission. This is because we need to print, communicat to Comport and read files from the local system from website. But have som problem with the permissions. </p>
  
  <p>I have filled in the most important things in the MANIFEST file:</p>
  
  <pre><code>Manifest-Version: 1.1
  Ant-Version: Apache Ant 1.9.1
  Created-By: 1.7.0_06  (Name)
  Main-Class: Applet
  Class-Path: lib/jcl.jar lib/jpos113-controls.jar lib/stario.jar lib/st
              arjavapos.jar lib/xercesimpl.jar lib/xml-apis.jar
  Application-Name: Java Applet
  Codebase: http://10.0.1.4/github/store/inc/applet/
  Permissions: all-permissions
  </code></pre>
  
  <p>I have also self-signed the main JAR file using "jarsigner".(will buy proper certificate later) The main JAR file consisting of several other JAR files. </p>
  
  <p>When applet runs in browser a safety box came up with information that the applet will run with unlimited restriction and ask if I wanted to do it or not.</p>
  
  <p>I Chose to run it, and everything looks good until I try to run for example: a printer class in one of the jars in my lib folder. The following error message shows in log: </p>
  
  <pre><code>com.sun.deploy.security.BlockedException: User has denied the privileges to the code
  </code></pre>
  
  <p>I have also tried to run privileged code within: (without success)</p>
  
  <pre><code>  AccessController.doPrivileged(new PrivilegedAction() {
          public Object run() {
              // privileged code goes here, for example:
              // Example..
              return null; 
          }
      });
  </code></pre>
  
  <p>Anyone have an idea what could be wrong? Or have any tips?</p>
  
  <p>Obs,Works if I run it directly in netbeans.</p>
  
  <p>// Kind regards </p>