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.
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
AWT_TOOLKIT set to
MToolkit AWT and Swing Java GUI's render fine, as shown below.
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.