Making GWT Hosted Browser work in Eclipse on Ubuntu

For sometime now, we’ve been having an issue with GWT Hosted browser not starting from Eclipse and Ubuntu / Kubuntu.

The error that comes up is

1
2
3
4
5
6
7
8
9
10
11
12
13
** Unable to load Mozilla for hosted mode **
java.lang.UnsatisfiedLinkError: /opt/local/eclipse-3.4-SR2-jee/plugins/com.google.gwt.eclipse.sdkbundle.linux_1.6.4.v200904062334/gwt-linux-1.6.4/mozilla-1.7.12/libxpcom.so: libstdc++.so.5: cannot open shared object file: No such file or directory
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1767)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1663)
    at java.lang.Runtime.load0(Runtime.java:787)
    at java.lang.System.load(System.java:1022)
    at com.google.gwt.dev.shell.moz.MozillaInstall.load(MozillaInstall.java:190)
    at com.google.gwt.dev.BootStrapPlatform.initHostedMode(BootStrapPlatform.java:53)
    at com.google.gwt.dev.HostedModeBase.<init>(HostedModeBase.java:362)
    at com.google.gwt.dev.SwtHostedModeBase.<init>(SwtHostedModeBase.java:98)
    at com.google.gwt.dev.HostedMode.<init>(HostedMode.java:271)
    at com.google.gwt.dev.HostedMode.main(HostedMode.java:230)

It could be resolved by installing libstdc++5 library in Ubuntu. Ubuntu only has libstdc++6 installed by default.
You can install the dependency by installing libstdc++5 package from your package manager (KPackagekit or Adept or Synaptic ) or by running the following command in a console

sudo apt-get install libstdc++5

Once the installation is complete, you should be able to launch the GWT Hosted mode browser just fine.

Tags: , , ,

One Response to “Making GWT Hosted Browser work in Eclipse on Ubuntu”

  1. Techie Thoughts » Blog Archive » Making GWT 1.5.x Hosted mode work in Ubuntu Karmic says on :

    [...] my last post on making hosted mode work on Ubuntu, I had upgraded my laptop to Kubuntu Karmic ( in Beta 1 as of this writing ). While most things [...]

Leave a Reply