/** * This kludge is specific to get over AccessControlException thrown during Applet.stop() or * destroy() when static thread is suspended. Set a flag in AppletClassLoader to indicate that an * AccessControlException for RuntimePermission "modifyThread" or "modifyThreadGroup" had * occurred. */ private void setExceptionStatus(AccessControlException e) { Permission p = e.getPermission(); if (p instanceof RuntimePermission) { if (p.getName().startsWith("modifyThread")) { if (loader == null) loader = getClassLoader(getCodeBase(), getClassLoaderCacheKey()); loader.setExceptionStatus(); } } }