The swing-UI of Java-programs doesn't work perfectly together with the awesome-wm. awesome is a window-manager for UNIX, that automatically resizes program-windows, and the Swing-UI doesn't recognize these resizes correctly. I don't care if awesome or Java is guilty, what I wanna know if I can change my Java-programs in a way, that they will work with awesome. So that users of my programs get the correct experience, even when they use exotic window-managers.
views:
1716answers:
3
+3
A:
From the man page of awesome:
BUGS
Of course there´s no bug in awesome. But there may be unexpected behaviours.
Java applications which use the XToolkit/XAWT backend may draw grey windows only. The XToolkit/XAWT backend breaks ICCCM-compliance
in recent JDK 1.5 and early JDK 1.6 versions, because it assumes a reparenting window manager. As a workaround you can use JDK 1.4
(which doesn´t contain the XToolkit/XAWT backend) or you can set the following environment variable (to use the older Motif backend
instead): AWT_TOOLKIT=MToolkit
Banengusk
2009-04-06 15:23:06
This brings up the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/motif21/libmawt.so
Mnementh
2009-04-09 21:58:14
java-6-openjdk package only has i386/xawt/libmawt.so and i386/headless/libmawt.so. Sun JDK also includes i386/motif21/libmawt.so
Banengusk
2009-04-13 08:50:00
Thanks for this hint. With the SUN-JDK it works.
Mnementh
2009-04-22 16:34:06
This solution isn't perfect. If you use Netbeans IDE, setting AWT_TOOLKIT=MToolkit will result in locking out the keyboard b/c of an old swing bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6506617. MToolkit may not give you any problems, just remember - if your keyboard starts to loose focus, you may need to use AWT_TOOLKIT=XToolkit.
Peter Nore
2010-10-10 02:33:59
+4
A:
Easiest workaround - get wmname from suckless and use it to set the name of the window manager to LG3D:
wmname LG3D
98% of the time this will fix the issue.
Peter Nore
2009-11-09 14:59:01