Sunday, November 29, 2009

We are 64bit ready, or not?

I got my new DELL XPS 9000 this week after long waiting, and started playing with it with great enthusiasm this weekend.

The computer will be my primary development desktop at home, so I have to install all my toolkits. I'm tired of OutofMemoryException while coding under 32bit OS, and finally I can have more heap size in JVM with this new 64bit powerful machine. :)

First step was very smoothly, I installed JDK 1.6.0_17 from Sun Java Website, and it has Windows x64 vesion.

Next step was to install my favorite IDE, Eclipse for Java EE Developers (Galileo). Wait, I couldn't find 64bit download! I can see 64bit version for Linux, Mac Cocoa, but not for Windows. There is only I downloaded this one, and obviously Eclipse gave me Exception!

Fortunately, someone already figured out and blogged about it. OK, let's download 64bit version of Eclipse SDK, and install my plugins one-by-one. After a really boring setup process, I got my Eclipse running under 64bit JDK!

Then it was time to install my favorite build tool - Maven. Very straightforward. After setting up environment variables, I can run mvn in command line.

At last, I wanted to try GWT with all of those tools, and that really pissed me off. I went through GWT Experience - Create GWT Module Project with Maven GWT Plugin. And I got compiler error when I tried to run the GWT application by Maven:

[INFO] [gwt:run {execution: default-cli}]
[INFO] using GWT jars from project dependencies : 1.7.1
[INFO] Unpack native libraries required to run GWT
[INFO] establishing classpath list (scope = runtime)
[INFO] create exploded Jetty webapp in C:\GWT\test\org.opentoast.admin\war
[INFO] auto discovered modules [org.opentoast.admin.Application]
[ERROR] You must use a 32-bit Java runtime to run GWT Hosted Mode.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------

What a surprise!

Googling, Googling, and I realized it is the problem in GWT 1.x. This has been raised as issue 134, issue 135, or issue 2880. Here is a good explanation from Dan Morrill at GWT Forum. So basically I have to wait until GWT 2.0 comes out with Out-of-process Hosted Mode (OOPHM) to get 64 bit support. Even right now GWT 2.0 RC2 is here to try, I still cannot use it with Maven, because gwt-maven-plugin won't work, I have to wait for a while until both are released.

Seems the only solution is to switch to 32bit JDK, and use all 32bit tools now. What a waste of time! Well, that's the price I have to pay when I play with new technologies.

No comments: