Monday, June 30, 2008

Java Programming & Desktop Effect (Compiz/Beryl)

There is a bug in Sun Java's Swing. It doesn't like certain window managers. Something about reparenting and not reparenting or something like that. Whatever. The point is, when trying to run a program you wrote using Swing, all you get is a big white nothing. Nothing draws in the window. Ahhh! What's wrong?! Yeah, I had some trouble with my Java class because of that one. Well, unfortunately, my favourite WM, Compiz/Beryl, is a problem child with this. However, there is an easy fix for it. Open your .bashrc (that in ~). If you don't know how, do this in the terminal:

vi ~/.bashrc

Add this line to it:

export AWT_TOOLKIT=MToolkit

Now try to run your program again. Now everything works. Yay!

Tested on OpenSuse 11.0 for SQuirrel SQL, Eclipse, Adempiere. For application that running from menu, you can try add line in file /etc/profile.

If you run the Java application from eclipse you also should add the parameter in Run menu | Java Application | [application name] | Environment and click New button and add


Variable Name: AWT_TOOLKIT
Value: MToolkit


NOW you can run your Java Application and use Desktop Effect (Compiz/Beryl/KDE Desktop Effect) on the same time. Cheers.

Source: ubuntulinuxtipstricks

5 comments:

Anonymous said...

After getting more than 10000 visitors/day to my website I thought your abraham-sulaeman.blogspot.com website also need unstoppable flow of traffic...

Use this BRAND NEW software and get all the traffic for your website you will ever need ...

= = > > http://get-massive-autopilot-traffic.com

In testing phase it generated 867,981 visitors and $540,340.

Then another $86,299.13 in 90 days to be exact. That's $958.88 a
day!!

And all it took was 10 minutes to set up and run.

But how does it work??

You just configure the system, click the mouse button a few
times, activate the software, copy and paste a few links and
you're done!!

Click the link BELOW as you're about to witness a software that
could be a MAJOR turning point to your success.

= = > > http://get-massive-autopilot-traffic.com

Anonymous said...

Eveгything is νerу οpen with а гeally
cleаr clarifiсation of the іssues. It was truly infoгmative.
Yоur site іs eхtremеly helpful.
Маny thanks fοr ѕharing!


Visit my web-site :: boracay beach hotels

Anonymous said...

Hi my friend! I want to say that this article is amazing, great written
and come with approximately all vital infos.
I would like to look more posts like this .

Here is my homepage padang indonesia Airport code

Anonymous said...

Hey just wanted to give you a quick heads up and let you
know a few of the images aren't loading correctly. I'm not sure why but I think its a linking issue.
I've tried it in two different browsers and both show the same outcome.

Feel free to surf to my web blog Jakarta To Bali Flights Air Asia

Anonymous said...

You have made some decent points there. I looked on the web for more info about the issue
and found most people will go along with your views on this website.


Look into my blog; BoracayMegaTrav