How to grant all permissions to java applet through JNLP without popups

code-gijoe picture code-gijoe · Jul 7, 2011 · Viewed 14.3k times · Source

We are launching an applet using jnlp The applet needs to load a native library The jar and the jnlp are signed with a self generated certificate. The jnlp grants all permission with

<security>
     <all-permissions/>
</security>

The policy file grants all permissions grant { permission java.security.AllPermission; };

We are getting a popup dialog “ java security warning” That says: this application is going to perform an insecure operation. Do you want to continue ?

Continue or cancel (see attached screen shot)

enter image description here

There is no “allow always” button

Which means that the dialog pops up “every time” the applet is launched. This is annoying to the user.

What can be done to disable this dialog to pop up or to make it appear at most once?

Answer

Andrew Thompson picture Andrew Thompson · Jul 11, 2011

What can be done to disable this dialog to pop up or to make it appear at most once?

Use a certificate that has been verified by a trusted authority. Disabling/ignoring the 'always allow' field for self-signed certificates is a decision by Oracle that they are unlikely to change.