java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "modifyThread") at java.security.AccessControlContext.checkPermission(java.base@9-ea/AccessControlContext.java:468) at java.security.AccessController.checkPermission(java.base@9-ea/AccessController.java:894) at java.lang.SecurityManager.checkPermission(java.base@9-ea/SecurityManager.java:541) at sun.applet.AppletSecurity.checkAccess(java.desktop@9-ea/AppletSecurity.java:231) at java.lang.Thread.checkAccess(java.base@9-ea/Thread.java:1488) at java.lang.Thread.setPriority(java.base@9-ea/Thread.java:1185)

JDK Bug System | Philip Race | 7 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    As of JDK 9 b120 the "Animator" demo applet throws an exception as follows :- jdk9b120/bin/appletviewer example1.html java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "modifyThread") at java.security.AccessControlContext.checkPermission(java.base@9-ea/AccessControlContext.java:468) at java.security.AccessController.checkPermission(java.base@9-ea/AccessController.java:894) at java.lang.SecurityManager.checkPermission(java.base@9-ea/SecurityManager.java:541) at sun.applet.AppletSecurity.checkAccess(java.desktop@9-ea/AppletSecurity.java:231) at java.lang.Thread.checkAccess(java.base@9-ea/Thread.java:1488) at java.lang.Thread.setPriority(java.base@9-ea/Thread.java:1185) at Animator.init(Animator.java:299) at sun.applet.AppletPanel.run(java.desktop@9-ea/AppletPanel.java:423) at java.lang.Thread.run(java.base@9-ea/Thread.java:843) --- I am not sure of why, since I can't pinpoint what changed, but can see that in AppletSecurity.java the call to "currentAppletClassLoader()" returns null now .. which is then interpreted as meaning the Thread (which is the applet's own main thread), is not in its thread group ... and that seems wrong .. and presumably inconsistent with all history since 1995 since the applet has always made this call.

    JDK Bug System | 7 months ago | Philip Race
    java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "modifyThread") at java.security.AccessControlContext.checkPermission(java.base@9-ea/AccessControlContext.java:468) at java.security.AccessController.checkPermission(java.base@9-ea/AccessController.java:894) at java.lang.SecurityManager.checkPermission(java.base@9-ea/SecurityManager.java:541) at sun.applet.AppletSecurity.checkAccess(java.desktop@9-ea/AppletSecurity.java:231) at java.lang.Thread.checkAccess(java.base@9-ea/Thread.java:1488) at java.lang.Thread.setPriority(java.base@9-ea/Thread.java:1185)

    Root Cause Analysis

    1. java.security.AccessControlException

      access denied ("java.lang.RuntimePermission" "modifyThread") at java.security.AccessControlContext.checkPermission(java.base@9-ea/AccessControlContext.java:468) at java.security.AccessController.checkPermission(java.base@9-ea/AccessController.java:894) at java.lang.SecurityManager.checkPermission(java.base@9-ea/SecurityManager.java:541) at sun.applet.AppletSecurity.checkAccess(java.desktop@9-ea/AppletSecurity.java:231) at java.lang.Thread.checkAccess(java.base@9-ea/Thread.java:1488) at java.lang.Thread.setPriority(java.base@9-ea/Thread.java:1185)

      at Animator.init()
    2. Unknown
      Animator.init
      1. Animator.init(Animator.java:299)
      1 frame