Why does my applet get a java.security.AccessControlException: access denied (java.net.SocketPermission …), and how can I avoid it?

后端 未结 8 592
别那么骄傲
别那么骄傲 2020-12-03 16:59

We are clueless about why my client is encountering a Java Security exception in Safari. Could anyone help?

The exception occurs reliably in Safari on Windows. Thi

8条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-03 18:02

    You can override the default security policy file used by the SecurityManager.

    1) Create a text file (eg. applet.policy)

    2) Grant all permissions to the applet

      grant {
       permission java.security.AllPermission;
      };
    

    3) Run the applet with

    -J-Djava.security.policy=applet.policy
    

提交回复
热议问题