java jvm bug — broken java application gui in compiz and beryl 

Compositing window managers, such as Compiz and Beryl, are eye candy we have grown accustomed to. However, there is bug in certain editions of Sun's Java Virtual Machine (JVM) that makes Java applications not render some parts of their Graphical User Interfaces (GUIs). All AWT and Swing Java programs suffer from this bug, including the popular Netbeans and Matlab platforms. A screenshot of Matlab running under Compiz and suffering from the JVM bug (i.e. with partially rendered GUI) is shown below.

Matlab menu missing: java jvm bug

A popular workaround, that I have been using for quite some time, is to change the default AWT toolkit before running a Java application. This can be accomplished by assigning an alternative toolkit to the AWT_TOOLKIT environment variable. For example, to run Matlab from the Bash shell, first specify a non-default JVM toolkit, MToolkit, and then run Matlab, as shown below.

export AWT_TOOLKIT=MToolkit
matlab

To run NetBeans from Csh shell or Tcsh shell use:

setenv AWT_TOOLKIT MToolkit
netbeans

With AWT_TOOLKIT set to MToolkit AWT and Swing Java GUI's render fine, as shown below.

Matlab with fully rendered GUI under Compiz: java jvm bug fixed

Enjoy!


Did you find the above information useful and interesting? If so, please support this site by using the blog directory links at the bottom of this page. Thanks for your support!

If you have any Linux related problems or questions then please feel free to post them on our Linux Forums: http://linux.dsplabs.com.au/forums.




VPS Hosting Referral Code DZZCC3

Add me to Technorati Favorites Vote for me on Blog Catalog

2 Responses to “java jvm bug — broken java application gui in compiz and beryl”

  1. Missing icons in Matlab, Ubuntu, Linux | LinuxTent Says:

    […] the AWT library with MToolkit [thanks to Linux Blog] You can […]

  2. dvb-c tuner Says:

    CineS2…

    […]Linux Blog » java jvm bug — broken java application gui in compiz and beryl[…]…

Leave a Reply