Wednesday, 16 February 2011

OpenJDK/JamVM Git repository

JamVM's got a shiny new Git repository, which contains the port to the OpenJDK class-library. Details are here:

The repository can be checked out anonymously with:
git clone git://
JamVM 1.6.0 will be released off of this in the near future. JamVM 1.6.0 will be a combined release, supporting both GNU Classpath and OpenJDK class-libraries, with GNU Classpath support being built by default. I still need to run some tests to make sure that the refactored codebase hasn't introduced any regressions w.r.t. GNU Classpath and JamVM 1.5.4.

So what can be done with the OpenJDK port? As discussed in my FOSDEM talk, it is ready for a first release. There's stuff which hasn't been implemented, but it runs everything I've tested it with (jedit, eclipse, derby, etc.).

Some words on running the port. JamVM is not yet integrated into the IcedTea build process (although it supports the same --with-java-runtime-library switch as Cacao). Instead, the easiest way to test the port is to build JamVM, and copy the file into an existing IcedTea/OpenJDK installation.

After cloning the git repository, do:
./ --with-java-runtime-library=openjdk
This will generate the autoconf/automake files and configure JamVM to build support for OpenJDK.

Then do make, make install as usual. This will put into /usr/local/jamvm/lib.

This can then be copied onto an existing IcedTea installation (or a copy of one), e.g. on x86_64 (as root):
cd /usr/lib/jvm
cp -r java-6-openjdk jamvm-openjdk
cp /usr/local/jamvm/lib/ jamvm-openjdk/jre/lib/amd64/server
You can then run it by running the normal java wrapper, e.g.:
/usr/lib/jvm/jamvm-openjdk/jre/bin/java -version

java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.5) (6b20-1.9.5-0ubuntu1)
JamVM (build 1.6.0-devel, inline-threaded interpreter)
(the inline-threaded interpreter is the other name for the code-copying JIT)


Christopher Friedt said...

Nice work Robert. Thanks for keeping the GNU Classpath as the default runtime as well ;-)

Jim said...

I built JamVM with OpenJDK on a Fedora Core 12 system following the directions in your post. It just worked. Cool stuff!

Anonymous said...

Will this jamvm 1.6.0 version (with classpath not openjdk) be compatible with java 1.6? I'm really curious about this. With openjdk for some reason things just won't start compiling due to all kinds of stuff missing o my nas.

Xerxes said...

This is awesome work Robert!

For your information, i have posted a patch to integrate JamVM into Icedtea6!

Cheers and have a great year!