JNLP "JVM Shared, not allowed to set security manager" error
<p>I have a JAVA Applet to perform digital signatures, certificate validations, and so on. It's signed with a valid certificate, it has a correct Manifest (I suppose) with values as:</p>

<pre><code>Permissions: all-permissions
Specification-Title: Applet Certificados digitales
Specification-Version: v1.3
Specification-Vendor: mycompany
Application-Name: Applet Java mycompany
</code></pre>

<p>And, it works perfectly, into a "applet" tag, thanks to NPAPI friendly browsers (tested only on Firefox and IExplorer). It has been running so by years ...</p>

<p>Now I want to let Chrome and Edge users use it, by using JNLP. 
And here it's ALMOST ok. I say "almost" because I can read store certificates, access to my ASP.NET WebApi, perform digital signatures .... but now I can't open smart cards to read certificates, due that SecurityException when I set the security manager:</p>

<pre><code>  public SmartCardProvider_SecurityManager(final ApduConnection conn) {
    super(NAME, VERSION, INFO);
    defaultConnection = conn;

    AccessController.doPrivileged(new PrivilegedAction&lt;Void&gt;() {
        @Override
        public Void run() {
            if (!(System.getSecurityManager() instanceof SmartCardProvider_SecurityManager)) {
                    System.setSecurityManager(new SmartCardProvider_SecurityManager(System.getSecurityManager()));
                   // Exception -&gt; JVM Shared, not allowed to set security manager
            }
.... 
</code></pre>

<p>Where</p>

<pre><code>private static final class SmartCardProvider_SecurityManager 
     extends SecurityManager { .....
</code></pre>

<p>This is my JNLP:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; 
 &lt;jnlp spec="1.0+" codebase="" href="thefile.JNLP"&gt;
 &lt;information&gt;
   &lt;title&gt;mycompany - JAVA apps&lt;/title&gt;
   &lt;vendor&gt;mycompany&lt;/vendor&gt;
   &lt;homepage href="http:\\www.mycompany.com" /&gt;
   &lt;description&gt;the description&lt;/description&gt;
 &lt;/information&gt;
 &lt;security&gt;
   &lt;all-permissions/&gt;
 &lt;/security&gt;
 &lt;resources&gt;
   &lt;j2se version="1.7+" href="http://java.sun.com/products/autodl/j2se"/&gt;
   &lt;jar href="APPLET_NAME.jar" main="false"  /&gt;
 &lt;/resources&gt;
 &lt;applet-desc documentBase="" 
    name="the_name" 
      main-class="myjavanamespace.clsApplet" 
      width="450" 
      height="250"&gt; 
    &lt;param name="0123225223   ..... /&gt; some ciphred params ... 
    &lt;param name="permissions" value="all-permissions" /&gt; 
&lt;/applet-desc&gt;
</code></pre>

<p></p>

<p>My last try was to add this param:</p>

<pre><code>&lt;param name="separate_jvm" value="true"/&gt;
</code></pre>

<p>But I get the same exception. I am out of ideas, so any help will be appreciated.</p>

<p>Current run enviroment:</p>

<ul>
<li><p>Java Plugin 11.72.2.15</p></li>
<li><p>Using JRE 1.8.0_72-b15 Java HotSpot(TM) 64-Bit Server VM</p></li>
</ul>