Java applications which use the XToolkit/XAWT backend may draw gray windows only. The XToolkit/XAWT backend breaks ICCCM-compliance in JDK 5 and 6 because it assumes a reparenting window manager.
There are a number of places where this is described:
- in the FAQ : GUI Java apps appear as a gray screen!
- in the wiki Problems with Java
- in the Man page
To sum up:
- it doesn't affect version Java 1.4.2 and before.
- it doesn't affect version Java 1.7 and hopefully after.
- the best workaround by far, is to set a name to the Window Manager, so it is recognise by Java as a non-reparenting Window Manager. A simple utility allow to set this name. Just add 'wmname LG3D' to your .xinitrc or simply run it.
- Here are other workarounds left here for reference:
- launch another X server, like Xephyr
- set the following environment variable (to use the older Motif back-end instead): AWT_TOOLKIT=MToolkit. But this won't work in the following cases :
- OpenJDK/IcedTea doesn't include the Motif toolkit.
- doesn't work for x86_64 Java, for whatever reason.