Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

Friday, October 30, 2009

Change Default JVM on OSX

If you install the Java 1.6 JRE on OSX Leopard 10.5 and want to make it default:

open /Applications/Utilities/Java\ Preferences.app

Saturday, May 09, 2009

Errors when Running GWT from Eclipse

I was able to get a preview release of the Google AppEngine SDK for Java last week, and finally had an opportunity to play with it. I installed Eclipse on my 64bit Ubuntu Linux box and all the plugins as suggested by Google's Java docs. Everything worked great until I tried to debug the default app as generated by the Eclipse Plugin.
I got an error in the GWT (Google Web Toolkit) packages saying (among other things)

libswt-pi-gtk-3235.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)

With a little digging, I found that this was related to 32bit compiled java libraries being run under the 64bit Java runtime. The solution is to install the 32bit Java runtime binary, and instruct Eclipse to use it.

#From Terminal
sudo apt-get install sun-java-6-bin ia32-sun-java6-bin
sudo apt-get remove gij
sudo update-alternatives --config java
# Select the 32bit runtime


From Eclipse go to Window -> Preferences -> Java -> Installed JRE's -> Add -> Standard VM and use the path /usr/lib/jvm/ia32-java-6-sun-1.6.0.13

Now you can Run -> Debug As -> Web Application

Friday, December 05, 2008

Set JAVA_HOME on Mac OSX

If you want to install the rjb Ruby Gem, you will need to set the JAVA_HOME environment variable.

Add the following line to ~/.login or /etc/profile and restart your terminal.

setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Home