Java Swing Tutorials - Herong's Tutorial Examples - Version 4.11, by Dr. Herong Yang
"AWT blocker activation interrupted" Error
This section provides a tutorial example on the condition for the 'AWT blocker activation interrupted' error in JDK 1.6.0.
When I ran the same test program, FrameThreads.java, listed in the previous section with JDK 1.6.0, I got some interesting results.
Test 1 - Run FrameThreads.java in a command window and wait:
Active thread = main Active thread = AWT-Shutdown Active thread = AWT-Windows Active thread = AWT-EventQueue-0 Interrupting thread = AWT-Shutdown Interrupting thread = AWT-Windows Interrupting thread = AWT-EventQueue-0
All three AWT threads are terminated. But 3 frame windows are still displayed on the screen event after 5 minutes. That means the run-time exception issue is fixed now.
Noticed that the "Java2D Disposer" thread is not there anymore in JDK 1.6.0. But if you check the parent thread group, the "system" thread group, you will the "Java2D Disposer" thread. In other words, the "Java2D Disposer" thread is moved from the "main" thread group to its parent, the "system" thread group.
Test 2 - Run FrameThreads.java in a command window and run Internet Explorer in full screen to hide those 3 frame windows. About 3 minutes later, all 3 frame windows are terminated. The console window shows:
Active thread = main Active thread = AWT-Shutdown Active thread = AWT-Windows Active thread = AWT-EventQueue-0 Interrupting thread = AWT-Shutdown Interrupting thread = AWT-Windows Interrupting thread = AWT-EventQueue-0 AWT blocker activation interrupted: java.lang.InterruptedException at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:485) at sun.awt.AWTAutoShutdown.activateBlockerThread(AWTAutoShutdow... at sun.awt.AWTAutoShutdown.setToolkitBusy(AWTAutoShutdown.java:... at sun.awt.AWTAutoShutdown.notifyToolkitThreadBusy(AWTAutoShutd... at sun.awt.windows.WToolkit.eventLoop(Native Method) at sun.awt.windows.WToolkit.run(WToolkit.java:290) at java.lang.Thread.run(Thread.java:619)
This tells me that the AWT package in JDK 1.5 is still having some issues if its threads are interrupted. So do not interrupt AWT threads.
Sample programs listed in this section have been tested with JDK 1.6.0.
Last update: 2014.
Table of Contents