13Oct/095
Working with GWT on Ubuntu 9
It's will be simple to start the example project. expect that there's some things to do to run hosted mode.
Running the web application will give you an error like this :
** Unable to load Mozilla for hosted mode ** java.lang.UnsatisfiedLinkError: .../eclipse/plugins/com.google.gwt.eclipse.sdkbundle.linux_.../gwt-linux-2.0/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:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1674) at java.lang.Runtime.load0(Runtime.java:770) at java.lang.System.load(System.java:1003) 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.(HostedModeBase.java:434) at com.google.gwt.dev.SwtHostedModeBase.(SwtHostedModeBase.java:162) at com.google.gwt.dev.HostedMode.(HostedMode.java:282) at com.google.gwt.dev.HostedMode.main(HostedMode.java:241)
This is due that the libstdc++5 is missing from your Ubuntu.
Usually an update thorough apt-get can save
sudo apt-get install libstdc++5
but you can get this message
Package libstdc++5 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package libstdc++5 has no installation candidate
Then you will have to get the libstdc++5 manually like this
# change directory to /tmp directory: cd /tmp/ # download deb package: wget -c http://lug.mtu.edu/ubuntu/pool/main/g/gcc-3.3/libstdc++5_3.3.6-10_i386.deb # unpack deb package to get library file dpkg -x libstdc++5_3.3.6-10_i386.deb libstdc++5 # copy library file to /usr/lib directory sudo cp libstdc++5/usr/lib/libstdc++.so.5.0.7 /usr/lib # change directory to /usr/lib directory cd /usr/lib # create a link to library sudo ln -s libstdc++.so.5.0.7 libstdc++.so.5
Now you will be able to run the hosted mode.
If you are using a 64bit linux you have to copy to /usr/lib32 instead of /usr/lib