Documentation Contents
Java Platform, Standard Edition Troubleshooting Guide
Contents    Previous    Next

10.1 Debug Tips for AWT

This section provides some helpful tips to be aware of when debugging issues related to AWT.

To dump the AWT component hierarchy, press Control+Shift+F1.

If the application hangs, get a stack trace by pressing Control+Break on Windows (which sends the SIGBREAK signal) or Control+\ on Oracle Solaris and Linux operating systems (which sends the SIGQUIT signal).

To trace X11 errors on Oracle Solaris and Linux operating systems, set the sun.awt.noisyerrorhandler system property to true. In Java SE 6 and earlier releases, the NOISY_AWT environment variable was used for this purpose.

Prior to Java SE 8, exceptions thrown in the AWT Event Dispatch Thread (EDT) could be caught by setting the system property sun.awt.exception.handler to the name of the class that implements the public void handle(Throwable) method. This mechanism has been updated in Java SE 8 to use the standard Thread.UncaughtExceptionHandler interface.

Loggers can produce helpful output when debugging AWT problems. For information on using loggers, see the Java Logging Overview documentation and the java.util.logging package description.

The following loggers are available:


java.awt
java.awt.focus
java.awt.event
java.awt.mixing
sun.awt
sun.awt.windows
sun.awt.X11
Contents    Previous    Next

Oracle and/or its affiliates Copyright © 1993, 2019, Oracle and/or its affiliates. All rights reserved.
Contact Us