如何克服AccessControlException:访问被拒绝..“ modifyThreadGroup”?

时间:2018-09-17 15:04:04

标签: java security applet accesscontrolexception

如何克服java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "modifyThreadGroup")

Warning: Applet API and AppletViewer are deprecated.
java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "modifyThreadGroup")
        at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
        at java.base/java.security.AccessController.checkPermission(AccessController.java:895)
        at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:335)
        at java.desktop/sun.applet.AppletSecurity.checkAccess(AppletSecurity.java:324)
        at java.base/java.lang.ThreadGroup.checkAccess(ThreadGroup.java:313)
        at java.base/java.lang.Thread.init(Thread.java:433)
        at java.base/java.lang.Thread.init(Thread.java:388)
        at java.base/java.lang.Thread.<init>(Thread.java:503)
        at app1.start(app1.java:13)
        at java.desktop/sun.applet.AppletPanel.run(AppletPanel.java:466)
        at java.base/java.lang.Thread.run(Thread.java:844)

0 个答案:

没有答案