Home / Java Patterns and Pitfalls     frequal.com

File Open Dialog Bug on Red Hat 8.0 Linux

Summary

Bringing up the File Open dialog in Red Hat 8.0 Linux (aka Red Hat 8 or RH8) causes the application to crash. This only happens under Gnome, KDE is OK.

To Fix:

unset GNOME_DESKTOP_SESSION_ID
before running your program.

Unsetting this variable causes Swing to fall back to the default look and feel (Metal or Ocean).

Details

By default, under Java 1.5+, the system look and feel is Gtk if the system is using Gnome. Java determines that by looking for the GNOME_DESKTOP_SESSION_ID variable.

The symptom of this problem is if the app hangs and a stack trace shows the native method readGtkIconData being executed in the AWT EventQueue.


Last modified on 22 May 2007 by AO

Copyright © 2024 Andrew Oliver