Java: Using Gson in an Applet causes SecurityException

前端 未结 3 1260
醉酒成梦
醉酒成梦 2021-01-21 18:27

I\'m trying to use Google Gson in my Java Applet, but when I do I get

Exception in thread \"Thread-19\" java.security.AccessControlException: access deni

3条回答
  •  春和景丽
    2021-01-21 19:08

    I have found the answer here.

    System.setSecurityManager(null);
    

    Adding to static main helped me. Of course, all-permissions in jnlp and so on must be.

提交回复
热议问题