"AWT blocker activation interrupted" Error in JDK 1.7

This section provides a tutorial example on the condition for the 'AWT blocker activation interrupted' error in JDK 1.7.0 and 1.8.0.

I also tested the same program in JDK 1.7.0 and 1.8.0 and got the following 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
AWT blocker activation interrupted:
   at java.lang.Object.wait(Native Method)
   at java.lang.Object.wait(Object.java:503)
   at sun.awt.AWTAutoShutdown.activateBlockerThread(AWTAutoShutdown...
   at sun.awt.AWTAutoShutdown.setToolkitBusy(AWTAutoShutdown.java:2...
   at sun.awt.AWTAutoShutdown.notifyToolkitThreadBusy(AWTAutoShutdo...
   at sun.awt.windows.WToolkit.eventLoop(Native Method)
   at sun.awt.windows.WToolkit.run(WToolkit.java:299)
   at java.lang.Thread.run(Thread.java:744)

The same error, "AWT blocker activation interrupted", showed up first. Then all 3 frame windows were terminated some time later.

Test 2 - Run FrameThreads.java in a command window, hide 3 frames behind another window and wait. I got the same results as test 1.

This tells me that the AWT package in JDK 1.6 is still having some issues if its threads are interrupted. But it behaves consistently now.

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


 PDF Printing Version