"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 any more 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

 About This Book

 Introduction of Java Swing Package

 Graphics Environment of the Local System

JFrame - Main Frame Class

 Creating Frames with Sizes and Locations

 Closing Frame and Terminating Application

 Listing and Interrupting AWT Threads

"AWT blocker activation interrupted" Error

 "AWT blocker activation interrupted" Error in JDK 1.7

 Displaying Chinese Characters in Frame Title

 Drawing Graphics - Using paint() on Frame

 Drawing Graphics - Using paint() on Component

 Drawing Graphics - Using paint() on Content Pane

 Drawing Chinese Characters on Frames

 JLabel - Swing Label Class

 JButton - Swing Button Class

 JRadioButton - Swing Radio Button Class

 JTextField - Swing Text Field Class

 Menu Bar, Menus, Menu Items and Listeners

 Creating Internal Frames inside the Main Frame

 Layout of Components in a Container

 LookAndFeel and UIManager

 Option Dialog Boxes

 JEditorPane - The Editor Pane Class

 SwingWorker - The Background Task Worker

 References

 PDF Printing Version