Red Hat Bugzilla – Bug 213908
Swing application on Sun Java 1.5 and 1.6 do not fully work with compiz
Last modified: 2008-01-14 06:44:21 EST
Description of problem:
This is a known bug in Sun Java, I think we can do very little, I'm just posting
it here with a small workaround so that other people can find it easily and run
java programs until a fix is released from Sun.
The problem is that Swing applications with Sun Java do not work with Compiz and
Desktop effects enabled.
On the net there are a couple of workaround available, but I have found only one
works with fedora core 6.
One suggest to use MToolkit instead of the XToolKit:
But this requires a library I was not able to find in fedora core 6 (it was in
the x11-deprecated-libs, but now this package seems to be removed).
The one that works with fedora is to install Xephyr and run java programs inside
Xephir, with metacity or another window manager that is not compiz, like the
following snippet shows:
--- cut ---
Xephyr :2 -ac -screen 1430x850 &
metacity --display :2 &
--- cut ---
Just Create a file named run_java.sh with this content, Then just run
./run_java.sh netbeans or ./run_java.sh limewire and you will get a java program
into a Xephyr session, just change -screen values to suite your needs.
While this is a less than optimal solution, it works.
The last workaround is to disable compiz and desktop effects and use metacity
but it is really difficult to come back to the old desktop after you have tried
Version-Release number of selected component (if applicable):
Sun Java, at least from version 1.5.0_05 to 1.5.0_09 and 1.6.0 beta 2; IBM Java
1.5.0 update 3. Other JDK may have the same issues.
Always, with compiz, some Swing based applications seem to work, but they froze
as soon as the user tries to resize the window.
Steps to Reproduce:
1. enable compiz
2. run a swing application
The application shows a grey windows, froze or does not resize (eventually
stopping to work)
Applications should start and work normally
GCJ seems to work, GNU classpath with Cacao also works. This is a bug in Sun
Java. SWT application are not affected. I have not tested AWT but it seems to
work, too (this is what I've read on the net, at least).
This is a bug enty in Sun Bugzilla that can be tracked:
I wanted to add that first workaround proposed (the MToolkit fix), can be
enabled for fedora by installing the package libXp.
I have tested netbeans with this fix and seem to run fine on jdk 1.6 rc and jdk
1.5.0_09, but limewire does not run, maybe other application have issues...
The jdk 1.6.0-u1 (officially released) works with compiz, I've not tested it
with beryl (I know there is a workaround for 1.6, but I don't know if it is
Reporter, I am not sure what version of compiz you used in April 2007 (sorry, we
missed this bug's activity), but could you check with the latest updates for FC6
(while it is still supported) whether this bug hasn't gone away in meantime, please?
I'm sorry, I'm not in fedora 7.
The bug is somewhat fixed as of release 1.6.0.
You don't need anymore the workaround proposed, but still you get gray windows
when opening dialog boxes. It seems to be quite random, and I'm not sure how to
fix this (I'm still getting this with an updated compiz-4.0 and jdk 126.96.36.199).
I can check with the latest packages in fedora 8 as soon as it gets out, in the
meantime, I'm trying to install compiz-0.6 and compiz-fusion for fedora 7.
I will also test with IcedTea and let you know.
Of course, I mean, "I'm not in Fedora Core 6 anymore"...
As indicated previously there has been no update on the progress of this bug
therefore I am closing it as INSUFFICIENT_DATA. Please re-open if the issue
still occurs for you and I will try to assist in its resolution. Thank you for
taking the time to report the initial bug.
Sorry for the long delay in replying. This bug seems to be fixed for IcedTea on
fedora 8, I'm currently using the rawhide version of IcedTea (based on b24:
I don't know if Sun will ever backport this fix to jdk 1.6, I was also told that
it maybe a mixed compiz and java issue.
This bug was really about jdk and was a reference to the sun bug 6429775, and
not openjdk, so I don't know if you can simply mark this as fixed in rawhide or
just leave as closed/insufficient_data.
Please, note also that NetBeans 6.0 currently does not work well with IcedTea.