While using Beryl as my default window manager, I noticed that some java applications didn’t work correctly, for example the XenServer Client.
The application started correctly but I only saw a gray screen.
Whenever my Metacity window manager (that’s the one of gnome) was active, instead of Beryl, the application works as it was meant to be.
This problem is explained in the beryl wiki.
The solution is also mentioned there.
Because I’m using java 5 (1.5.0u11 from Sun) the fix is very simple.
I added following line at the end of /etc/bashrc.
After restarting the X server the java applications works without any problems.