--- old/src/java.desktop/share/classes/sun/awt/AppContext.java 2015-10-06 15:11:47.000000000 +0300 +++ new/src/java.desktop/share/classes/sun/awt/AppContext.java 2015-10-06 15:11:47.000000000 +0300 @@ -525,7 +525,10 @@ } // Then, we stop any remaining Threads - this.threadGroup.stop(); + AccessController.doPrivileged((PrivilegedAction) () -> { + threadGroup.stop(); + return null; + }); // Next, we sleep 10ms at a time, waiting for all of the active // Threads in the ThreadGroup to die.