Getting GWT working on Ubuntu AMD64

Get this error?
/gwt-linux/libswt-pi-gtk-3235.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)

Error comes from running 64bit java and trying to use 32bit java compiled libraries.

I finally found the easiest work around for getting ./KitchenSink-shell to work on my desktop. I have ubuntu amd64 installed. I traded gij for sun-java-6-bin java. Then installed ia32-sun-java6-bin which added 32bit java on the hard drive for use. (in my case located /usr/lib/jvm/ia32-java-6-sun-1.6.0.03/bin/java, check synaptic properties for installed files)

This is the java I used to run the ./KitckenSink-shell. I replaced "java" with "/usr/lib/jvm/ia32-java-6-sun-1.6.0.03/bin/java"

Now to find a way to change the environmental java variable.

1. Optional: Install sun-java-6-bin and remove gij... (this will replace the with suns java)
2. Install ia32-sun-java6-bin
3. Install galternatives (this is the progam to have for defaults!!!)
4. Run galternatives from shell (don't sudo this, b/c it will change roots defaults and not yours.)
5. Find java in galternatives, choose the default jvm (Find em located in /usr/lib/jvm)
Install as many JVMs as you want to, and choose the one you want to use with galternatives.

#This is a must have!!
sudo apt-get galternatives

#Another way to do it in shell
#sudo update-alternatives --config java


If you have the same problem in Eclipse. Configure the JRE. Goto Installed JREs..., Hit Add, and find another jvm in /usr/lib/jvm.
or
In Run > Java Application > Your Application Configuration > JRE > Installed JREs... > (Preferences) Add > /usr/lib/jvm/ia32...jvm



Great Reference Article:
http://antbook.org/display/antbook/Installing+Java+6+on+Ubuntu+7.04
5 comments

Popular posts from this blog

How to Get Date/Time in/with GWT

Encoding URL delimiters (for GWT)