Using Java applications on Ubuntu 7.10 (gutsy) sometimes show empty windows. I’ve encountered this mainly with LDAP Browser/Editor and IDEA 7.0. It does not occur too often and mainly with small dialog windows. I guess Java 6 has some problems with Compiz which is enabled by default since gutsy.
The solution is to upgrade to Java 7 which is currently available as an early access version from the JDK 7 project at Sun.
This fixed my problems with LDAP Browser/Editor but IDEA complained with a “Java Version Mismatch” error. IDEA 7.0 officially requires Java 5 or Java 6, but also works with the EA of JDK 7. You can disable the check for the correct Java version by adding the following line to idea.vmoptions:
-Didea.no.jdk.check=true
Update
As eivindw wrote in the comments you may also be able to make IDEA work with Java 6 by setting the following environment variable:
export AWT_TOOLKIT="MToolkit"
MToolkit switches to the Motif implementation of AWT which was removed for Java 7. On my 64-bit version of Gutsy using MToolkit with Java 6 resulted in a core dump.
Update
Related posts:
is this working reliably for you?
I find that the popup dialogue boxes have gone from being always blank, to intermittently working.
I’m on 7.10 with the extra eye candy and intellij 7.01
Yes I am running the extra eye candy, JDK 1.7.0-ea-b23 and IDEA 7576 from the Selenia EAP page (that’s a prelease of the upcoming 7.0.2).
hooray. fixed. Set the new JDK value in the /etc/environment when I had the old one set in /etc/profile. doh.
Thanks, nice to finally have idea behaving politely in ubuntu with all the bells and whistles
. Well for now..
thanks…this worked for me too!
Do you think Intellij version 6.x would work ok with Java 7? I don’t want to upgrade to Intellij 7.x and have my 6.x Intellij license expire. Right now about half the popups come up blank.
I don’t know, just try it
Hey.. This seems to fix the problem with JDK 1.6:
export AWT_TOOLKIT=MToolkit
Thanks, this finally provided the solution that i was looking for, since the JDK 7 dramatically reduced Intellij’s performance…
I have same problems with Swing and Eclipse. The most windows in a J2SE application are empty. I found this happens only if I had activated the "Advanced Effects" on screen appearance menu.
<pre class=”codeSample”>MToolkit solution would not work on 64-bit Ubuntu.
As previous poster say, you can get Java 7 (beta).
If you do use it, you need to turn-off JDK version check.
You can do it by adding the following line to ‘
idea.vmoptions’ file
-Didea.no.jdk.check=true
Cannot speak of performance hit – not much experience.
Also, I tested openjdk-jdk and it looks like it works. So you may want to try that option.
Okay
I’ve been using with both openjdk and java 7 – both have serious issues. I get ‘PermGen’ max error and sometimes it freezes up. Very annoying….
Maybe I move to Eclipse…
Did you try using:
export AWT_TOOLKIT=MToolkit
?
This solved the issue for me without the need for a JDK upgrade
The export AWT_TOOLKIT=MToolkit trick also worked for me for some other java applets.
Thanks for the tip.
What does that mean?
Im using Eclipse on Ubuntu. (Im a newbie)! All my project that use swing / awt, does not work. Just show a blank application? Anybody could tell me how to fix this?
You can work around this issue by using a pre-release for JDK 7.