23 May 2004 mjw   » (Master)

GNU Classpath, JamVM and Eclipse

When Robert released the latest JamVM 1.1.4 his release notes just said:

  • JNI enhancements introduced in Java 1.2 implemented.
  • Updated to use GNU Classpath 0.09.
  • [...Some build infrastructure improvements...]
  • Minor bug-fixes and speed optimisations.
  • Eclipse now starts up.
Note that last little point. Eclipse is a huge complex application (suite) that tests most of the runtime and library facilities. When a java-like runtime is able to provide the execution environment for such a large project it is a sign that the project has matured and can be used for some serious work. I am really excited about this "little" break-through. Of course GNU gcj, Kaffe OpenVM, Jikes RVM and ikvm.net already could be used as alternative execution environments for Eclipse. But JamVM is the first "pure GNU Classpath runtime" that does it which is also really easy to install. All the other runtimes have larger or smaller hacks (mainly to some of the native or vm specific code) and/or are not that easy to install (need another VM or .net environment to be bootstrapped for example). JamVM does it without any JamVM specific GNU Classpath hacks and only depends on GNU Classpath and a simple C compiler. So this also proofs that GNU Classpath itself is pretty mature and usable out of the box.

We are not completely there yet though. Playing a bit with it shows some obvious bugs in our code. There seems to be some nasty with the serialization code that I cannot pinpoint. Runtime.exec() seems to have some strange issues passing some environment variables (like PATH), VMProcess had a bug that Process.wait() wouldn't work reliable (fixed in CVS) and ResourceBundle doesn't always seem to be working with the correct classloader. So still lots of stuff to hack on. But now that we are able to run this huge test suite (some call it an IDE) out of the box it will be easy to finally fix those issues once and for all. And hopefully in a generic way that can be used for all runtimes based on GNU Classpath.

If you want to play with it just install GNU Classpath 0.09, JamVM 1.1.4 and Eclipse 2.1 (gtk+). And do:

PATH=.:$PATH ./eclipse -vm /usr/local/jamvm/bin/jamvm -verbose -consoleLog -vmargs -mx256M -ms256M
killall eclipse (or CTRL-C if you don't have your prompt back after 20 seconds)
rm workspace/.metadata/.registry
PATH=.:$PATH ./eclipse -vm /usr/local/jamvm/bin/jamvm -verbose -consoleLog -vmargs -mx256M -ms256M

[Update: If debugging GNU Classpath itself isn't your main goal but you just want a working free eclipse I would recommend native eclipse (eclipse compiled with gcj to a collection of native libraries). It works out of the box on Red Hat systems and when using alien to convert the rpms you can get it working on Debian systems also. You can even use it for hacking the GNU Classpath sources]

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!