My guess is that it's a problem with
the xulrunner on ubuntu. Please try the snippet below (you may need
to change its GRE_LOCATION value). The only swt it uses is the OS
class to invoke a few gtk functions. All xulrunner interactions are
done via JavaXPCOM, so you'll need MozillaInterfaces.java from http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/184.108.40.206/contrib/sdk/xulrunner-220.127.116.11.en-US.linux-i686.sdk.tar.gz
on your project's build path. It your xulrunner is answering these
values properly then two alerts should be printed to stdout.