GWT Hosted mode on 64bit linux

GWT for linux is build against 32bit architecture. It contains some SWT/GTK 32bit modules. So if you try to run it with 64bit java it fails

Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/tools/sdk/gwt/gwt-linux-1.5.3/ /opt/tools/sdk/gwt/gwt-linux-1.5.3/ wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(
    at java.lang.ClassLoader.loadLibrary(
    at java.lang.Runtime.load0(
    at java.lang.System.load(
    at org.eclipse.swt.internal.Library.loadLibrary(
    at org.eclipse.swt.internal.gtk.OS.<clinit>(
    at org.eclipse.swt.internal.Converter.wcsToMbcs(
    at org.eclipse.swt.internal.Converter.wcsToMbcs(
    at org.eclipse.swt.widgets.Display.<clinit>(
Could not find the main class:  Program will exit.
[INFO] ------------------------------------------------------------------------

You have two choices. Find 64bit SWT/GTK modules with same build version (3235 in this case) - good luck! or download 32bit JRE.

I chose second option and it took me 3 mins to resolve the problem.
Find proper JRE version on Oracle site I suggest bin file instead rpm. It unpacks jre to own dir. Move that directory to some convenient location (it doesn't matter where). Edit and set java.executable to java exec located in 32bit JRE.
Now run your GWT hosted mode and be unstoppable developer!

You may have some warnings from GTK, such as

/usr/lib/gtk-2.0/2.10.0/menuproxies/ wrong ELF class: ELFCLASS64
(GWT:351): Gtk-WARNING **: Failed to load type module: /usr/lib/gtk-2.0/2.10.0

But it has no consequences for me, so far...

Some sources say that you should set an environment var:


to block bugs in X display layer but I don't know what does it mean :)

In this case I had to hadle with GWT version 1.5.3 (old corporate project)