Ubuntu 7.04 での Java, NetBeans, Compiz, Beryl に関する補足
Ubuntu 7.04 からは Compiz がデフォルトで入っていますね。「デスクトップ効果」を選択すると有効になります。あるいは Beryl をインストールして使っている人も多いと思います。これらの 3D デスクトップ環境ではまだ Java6 では対応していません。NetBeans を起動すると以下のようなウィンドウに真っ白になってしまうと思います。(スクリーンショットは Fedora Core 6 で撮ったものです)
これらのバグは以下だと思っています。- Compiz: 6429775 : Xgl/Compiz/Java 1.5/Swing problem
- Beryl: 6509038 : Beryl support in AWT/Swing as a NonReparenting WM
Ubuntu の multiverse にはまだ Java6 u1 はなく、Sun から提供されている Java6 u1 は
からダウンロードできます。Ubuntu では Linux self-extracting file を選びます。インストール後にはフォントの設定をしないといけないのですが、前に書いた fontconfig.properties でいけると思います。他にもいろいろ方法があるので是非以下の NetBeans ユーザー FAQ のページを参考にしてみて下さい。
Java6 u1 をどこかにインストールしたら NetBeans の起動時に --jdkhome オプションを指定して起動すれば有効になります。また etc/netbeans.conf ファイルに書いておけます。このあたりのことも NetBeans ユーザー FAQ を参照してみてください。
ということで、まとめですが、
- Compiz を使うには Java6 u1 が必要
- Java6 u1 はまだ Ubuntu 7.04 用の multiverse には提供されていないので自分でダウンロードしてインストールする必要がある
- Beryl の問題はまだ解決されていないが回避策はある
- Java6 u1 を使うと NetBeans 6.0 が GTK のネイティブルック&フィールになるのでうれしい




英語が分かりますか。
the new jre 1.6 still doesn't fix the problem with swing apps when running compiz/beryl, hope they will work around this problem very soon. :(
Posted by somebody else on August 26, 2007 at 01:31 AM JST #
Thank you for comment! Yes, I'm using Compiz on Ubuntu and Solaris with JDK6u1 and u2, but sometimes I'm still seeing blank dialog :-(
Posted by Masaki on August 26, 2007 at 07:38 AM JST #
I never got a blank dialog, but the frames just don't update their content when resizing. That may be not a very big problem but I think I'm sort of a perfectionist.
Posted by somebody else on August 26, 2007 at 02:52 PM JST #
Thank you very much for updates. Btw, which application are you using mainly? The problem of blank screen is often happening on NetBeans IDE, I've never seen such issue on native GTK apps and other *small* Java application. I'll try to take screeshots :)
Posted by Masaki on August 26, 2007 at 05:24 PM JST #
I think compiz/beryl are not perfect yet, if I set them to be startup program sometimes it doesn't work correctly, ie there is no hightligh in menus although I point the mouse cursor at them, sometimes there are blank java swing windows. But if I start it normally after starting gnome there is no such problem except for the resizing one.
Since swing is written by java and based on the AWT API as far as I know, the resizing problem(sorry if my poor english bothers you) is probably caused by the java code because the gtk apps work fine. I tried to make a simple java program that has a JFrame which reacts when it's resized, it will print to the screen a message if the frame is resized. The program runs well in metacity but if I enabled compiz it doesn't print anything on the screen, I guess that's the source of the problem: the swing windows doesn't realize the resize event so they don't update their contents.
I use jedit and netbeans IDE and I do some java development:)
P.S: hey Masaki, are you a student or professor? are you a developer? sorry I don't understand japanese, I was just wandering on the net to find a solution and got to your blog,it's quite interesting to chat with a japanese :) Haven't seen many japanese people in some english used forums.
Posted by somebody else on August 26, 2007 at 06:54 PM JST #
I see, the reason makes sense.
Have you tried AWT_TOOLKIT=MToolkit? It makes trouble for me about the event handling :( But I'll check the blank dialog is happening or not.
I'm not a student, not a developer :) I'm a globalization engineer and working on NetBeans software localization into Japanese. Yeah, it's true, there are not many Japanese guys in English forums.
Posted by Masaki on August 26, 2007 at 07:38 PM JST #
lol now it solved the resize problem but I got a blank Netbeans window.
you are a globalization engineer? cool, I wonder if there are people in my country work to localize netbeans into vietnamese(I'm vietnamese), the good things about opensource is that you have so many choices to choose from and you can customize till your heart's content. I hope the future would be opensource OS(es) or Linux cause I don't want to throw away my computer and buy a new one for Vista.
Now If they fix all the problems with java and we have a compatiable video player everyone would be happy working while enjoy a modern 3D desktop and noone would care about Vista or Leopard
about the last part, I wonder why ? :(
Posted by somebody else on August 26, 2007 at 08:24 PM JST #
How about fonts and input methods for vietnamese on Linux? Good enough? Now almost even OS are opensourced, but fonts and input methods for Japanese are weak than Windows.
The major reason is language. Japanese guys are not good at English. Also I think it's from the national character.
Posted by Masaki on August 26, 2007 at 09:16 PM JST #
about vietnamese language, we have this genius guy Pham Kim Long who wrote an excellent opensource vietnamese input programme. Heck, that guy spent hundreds of hours to make the programme and it's just perfect, we had comercial programmes but noone uses them now . And I thought Anthy(Scim) is pretty good for typing japanese? Scim doesn't support vietnamese very good thought.
I've heard(actually read) from some forums that japanese people are xenophobic and think that japanese are superior to other asians and blah blah blah, I'm sorry if this offend you but I'm a little curious since I am quite interested in japan.
Posted by somebody else on August 26, 2007 at 10:01 PM JST #
Anthy is still not good enough for me. I wanted to use it but the quality of conversion for Japanese is still poor than other commercial IME e.g. ATOK. I think it's one of the weak point of Linux Desktop. I had to switch to ATOK on my Linux so that I can use it for my work :)
Actually some Japan are xenophobic, it's true. Because Japan is one island and had been closed from other countries in some period. But I don't think most Japanese think they are superior to other asian countries.
Posted by Masaki on August 27, 2007 at 10:10 AM JST #
I thought you can disable scim and set your prefered programme to run at startup? In Ubuntu you can select system->preferences->sessions and add your prefered programme to the list, that's what I do with my vietnamese input programme.
Some people in those forums say xenophobic which means to hate foreigners but they also state that japanese people like white people but dislike asians other than japanese. The same goes with some other asian nations(ie China). I'm quite surprised, never knew that asian nations have so much pride, here in Vietnam foreigners are popular LOL. Damn, I go off topic, I'm sorry.
Posted by somebody else on August 27, 2007 at 11:16 AM JST #
I'm sorry I misunderstood your post, you meant you have to buy the comercial product and use it with linux,right?
Posted by somebody else on August 27, 2007 at 11:27 AM JST #
True :-) I have to use a commercial input method engine on Linux Desktop. Anthy does not work well for me with my usual tasks, e.g. writing email and blogs, etc.
Posted by Masaki on August 27, 2007 at 11:31 AM JST #