• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Apache Harmony status update

kamper

Diamond Member
Last summer I made a post about the Apache Harmony project to implement a jdk. There hasn't been any talk of it since and I've just finished slogging through a backlog of almost 1000 emails on the dev mailing list so I figured I'd give a quick summary of what's been going on for those who are interested.

There are a few main areas to work on, the most prominent being the jvm itself and the class library (java.foo.*, etc). In all areas, the first priority is to find acceptable projects to borrow from in order to avoid the ridiculous amount of work that an implementation from scratch would take.

Class libraries
It was decided fairly early on GNU Classpath should be used for the class library. This is (afaik) by far the most complete classlib out there and most of the free vms use it. With a little extra momentum from harmony it isn't too hard to imagine fixing the last chunk and making it compliant. The problem is that it is gpl'ed. There is an exception in the license which would make it perfectly legal to use it with an apache licensed vm, but the FSF and AF have too many philosophical differences to allow proper co-ordination without working out some issues. For some months lots of people discussed various ways of making it work, but nothing satisfactory came about.

More recently, there have been sizeable donations of code from both IBM and Intel. From IBM, at least, this is not stuff from their main jdk, but other research projects (they have lots of 'em). The contributions include java.lang, util, net, io, beans, security, math and some other stuff I think. It's not complete, but it's enough to get a java virtual machine up and running. One guy even has eclipse running on top of it already. The catch is that the classlibrary/vm interface is designed for running with IBMs J9 jvm, which is not open source. They've made binary blobs available for linux i386 and win32 to allow people to hack the java code but this will have to be replaced as soon as possible with something Free. Most likely this will start by being compatible with the Classpath interface, since virtually all jvms out there use it.

Anyway, the idea of using Classpath has been more or less dropped for now. If it stays that way, there will be a sizeable amount of reinventing the wheel to do to complete a classlib, but who knows, maybe IBM and others will be coming forward with more code in the future.

JVM
There have been two donations, vms called jchevm and bootvm. These were both one-man personal projects and both of those guys are now contributing to the harmony versions. Neither is particularly super, I think they both rely completely on interpreting rather than JIT compiling but they are a place to start from and get people involved in hacking. Hopefully they will also soon be able to host the classlib contributions from IBM/Intel although I don't think bootvm is even in a state to host Classpath yet.

Both are written in C and happen not to work very well on windows. One guy has finally succeeded in building jchevm in cygwin but hasn't gotten HelloWorld to run on it yet.

So there's tonnes of work to be done in this department. The good news is that it shouldn't be too long until there's a vm that can properly run a java program and all the work after that will essentially just be re-architecting things for performance, even though that's probably the much bigger job.

There hasn't been any talk of a vm written in java for a long time. It's not ruled out, just nobody has come forward with any code.

Tools
Right now various compilers are being used, like jikes or the eclipse compiler. Nothing is officially part of harmony as of yet, but it doesn't really matter, as using different outside tools makes no difference. Other tools (like javadoc, rmic, etc) are virtually non-existent but once again, developers can easily use tools from other projects for most of what's necessary.

Coles Notes
-there's code in the repository and lots of hacking going on
-the classlib will largely be a reimplementation, with seed donations from IBM & Intel
-there are two minimal vms currently being hacked on
-it won't be long until they can run normal java programs but it'll be a long time until they use all available technologies to actually run fast
 
Back
Top