Run Eclipse 3.2 SDK under Apache Harmony
Today, Apache Harmony jumped into my eye again. R.J. Lorimer, the EclipseZone editor, posted a topic about recent words from Harmony project mailing list. As a pre-investigation to my soc proposal, I’m think about the possibility of using harmony to construct a compact, effective and customizable Java(Eclipse) runtime core. After some attempts, I must to say, Harmony surprised me!
First, I downloaded the latest harmony snapshot and other pre-requisites from the Harmony project’s instruction. The size of all the Harmony JRE is about 28M, but the one of Sun’s JRE(full) seem to be 60~80M. Lots of people don’t like pack too many junks into the core of JSE, new Harmony give you another choice really. Now, harmony just released the class library which is a subset of the JSE 1.4.2. However, I find even the subset lib has arrived at a high coverage level in the 1.4.2 core API(a little for 1.5, in fact the VM of Harmony is from IBM J9 R2.3, a 1.5-compatible VM. So…)(see GreenBar in pic1).
pic 1
Then, I try to start a clean Eclipse 3.2 RC3 under Harmony. I met a crash in the start-up period. That is, the latest harmony snapshot(06-Apr-2006) does not support Eclipse 3.2 without modification. After checking, this seem to be a problem caused by the uncompleted regular expression package in the lib - latest-harmony-win-x86-snapshot.zip (06-Apr-2006 07:00). I download the latest version of regex module from harmony SVN, and pack them into a new lib.
Pic 2
Now, I could see the Harmony’s power for the first time(see pic2). Great! Harmony, now, is strong to support Eclipse Development or Application at least. Oh, Enough now! But to my upset, Eclipse seemed to be very unstable. After I opened the “Help”, SWT threw a exception and made the Eclipse crash again.(see pic3) After checking again, it was known all the crash came from “OutOfMemoryError”.
Pic 3
Is the default arguments of Harmony vm(from IBM) not suitable for my old and poor PC? Maybe true! Changing the vmargs to my classical command line “-vmargs -Xms256m -Xmx256m -XX:PermSize=64m -XX:MaxPermSize=64m”, I could embrace Harmony now! I played with Eclipse for tens of minutes, and test a complex GEF example(see pic4), everything is very OK. And, IMHO, the speed of Eclipse’s response under Harmony is a litter faster than that under Sun’s JRE.(After some more tests by SciMark 2.0, Harmony is a litter slower than Sun’s JDK6-b84 in my PC) Cool!^_^
Pic 4
Though Harmony is far from J2SE1.5 Target, it is not far from Java Development in some extent. I hope this little note can help more people to get interested in using both great tools in the life from now^_^
ps: The most problem of Harmony may be its unstable memory management(or need some tricks for J9 VM args?). I sugguest to set a big virtual memory space if you meet “OutOfMemory” exception.
See Also:




