Lately, I've been thinking a lot about the question "Is it JavaTM?", from the perspective of open source and free software implementations. I'm quite smitten with Apache Harmony (obviously), and there are lots of other implementations of piece-parts (GNU Classpath, Kaffe, GCJ, etc) as well as the 800-lb gorilla that has just started to show up, Sun's OpenJDK project.
So we have lots of code out that that claim to be implementations of the Java SE specification, but what actually makes those implementations "JavaTM", or as a Sun branding pedant would have it, "JavaTM compatible"? I'm actually a True Believer in the compatibility promise of Java - I think that it's very important - as a software developer, knowing that my runtime platform is Java (or "Java compatible") means that, in the memorable words of Rob Gingell, "my bytecodes won't be lied to". While this explicitly means that my programs will run as I expect them to, the implicit benefit is that I'm free of vendor lock-in. I can take my program and move it to another Java implementation, on another hardware platform, on another operating system. My choice, my freedom.
Traditionally, the way you know you have Java (or an implementation of one of the many JSRs that augment the base platforms) is if the implementation passes the "TCK" - the Technology Compatibility Kit - a test suite that any implementor can obtain from the spec lead to demonstrate that their implementation is compatible with whatever spec they've implemented. When you pass the TCK, you can claim compatibility with the spec and as a side benefit, you get all the "necessary IP" held by any members of the Expert Group that created the spec, a mechanism that keeps any member of the Expert Group - including the Spec Lead - from acting like a patent troll, being able to commercially control usage of the spec through patents. Java is an "open" ecosystem, right? ;).
So how is this related to the blossoming of open and Free implementations of Java? I was reading this recent blog post by Chris Adamson of OnJava. He asks if the DLJ - the Distribution License for Java - matters anymore, based on the premise that the linux distros will be doing their own packaging :
"Of course, with the GPL release of Java, the need for the DLJ would seemingly go away"
Does it? What exactly is the result when the distros compile and package the OpenJDK source? I'll argue it's by definition not "JavaTM" (or "Java compatible") because it hasn't passed the TCK. I'm sure that it's reasonably good software - after all, it's based on the same source code that Sun ships as tested binaries under their proprietary licenses. If a distro, especially a commercial distro that is feeding commercial enterprises, wants to deliver commercial-grade (whatever that means) infrastructure, I'm betting their customers will demand "JavaTM compatible", not "something based on the code that goes into Sun's implementation of Java".
One of the "success drivers" of open source is the notion of "good enough" - people are very happy to use solutions that are good enough to get the job done. They aren't necessarily the fastest, or the most stable, or full-featured, or pedigreed, but are fast enough, stable enough, functional enough, or "pedigreed enough". So whatever you get when you compile OpenJDK may be "good enough", but it won't be "JavaTM" or "JavaTM compatible". Now, I'll risk being accused of spreading FUD here, but I really wonder - is there an implicit "fork" coming in Java, with users choosing between "JavaTM compatible" runtimes and ubiquitous "Good enough" runtimes? (Maybe that's why I get winks and giggles from my Free Software friends when I ask them questions like this....) Last week, I spent some time traveling around Belgium and the Netherlands. Trains are two-class - first class means you probably get a seat, second class is good enough, but both tend to get the job done. (To really screw up this metaphor, I suppose I can conflate .NET/Mono and Amtrak as examples of the bad things that happen when you have a single supplier...)
I'm really not interested in seeing this. I've spent a lot of time in the last few years helping create compatible implementations of Java specifications in open source, including helping drive awareness of the value and utility in the Java compatibility promise. I'm hoping I'm wrong here - that this is a hypothetical, and that a solution will emerge where the Linux distros are shipping tested binaries. If I put on my tinfoil hat, I can see that this fits with my Walled Garden Theory about Sun's open source Java strategy, but the long term consequences are so disastrous, I can't believe it (even with the tinfoil hat...). Two obvious solutions - 1) OpenJDK releases binaries under the GPL, so that the distros that are happy re-packaging binaries from others can do so, and 2) those that need to build from source simply get the TCK from Sun and test what they ship. I suspect that the latter will be the way it will have to happen, given the need for the distros to build from source (and it will be fun to watch), but it leads to the outcome best for the ecosystem - preservation of the Java compatibility promise, and the long-term health of the platform.