Dalibor Topic, lead Kaffe developer and Classpath contributor, kindly agreed to take part in an interview, conducted by email. He uses his insight and expertise to give us the inside on Sun’s GPL’d Java.
He talks about OpenJDK’s effect on Kaffe, Classpath, etc., his views on Mono, his opinion of the Sun code, and more…
Could you describe your involvement with the Kaffe and Classpath projects?
DT: I contributed my first few patches to Kaffe back in 2000, after hearing about a free VM.
I really joined the project in earnest in early 2002, helping Jim Pick bring back a slightly dormant Kaffe project back into action, and stayed around since, taking over the duties of a co-maintainer.
Since Kaffe users wanted to use it to run current versions of applications like XML processors, and Kaffe’s class library had not seen much maintenance work for a while, I looked at GNU Classpath as a class library implementation provider with interesting parts to integrate into Kaffe’s own class library to make such applications work.
Thanks to the Classpath team working quickly on implementing more and more of the standard class libraries, soon there was a strong incentive for Kaffe to start merging its own class library with Classpath’s, and that’s how I really got involved with Classpath. We migrated Kaffe gradually over to Classpath’s class library. In the course of that work, several Kaffe developers started working on Classpath directly, and the rest is history.
I’ve got to particularly point out the work done by Mark Wielaard, the GNU Classpath maintainer, and Tom Tromey, the gcj maintainer, that made it so straightforward for Kaffe to become a part of the GNU Classpath community.
Could you describe any other Free Software projects with which you are involved?
DT: In general, I’ve tried to make sure that whatever patches came up in the context of Kaffe porting and development went upstream to the projects we use code from, so you can probably find my name on bug reports and the occasional patch going into GNU Libtool, GNU Gettext, etc.
In my other life, I work on a Free Software theorem prover, SPASS, from the Max Planck Institute for Computer Science in Germany.
What was your first reaction when you heard about Sun releasing Java under the GPL?
DT: I was very happy, and excited that the rumors turned out to be true.
We have won the "struggle to liberate Java" in the finest possible way: with Sun deciding to come with flying colors in support of setting Java free, and taking the leading position in that movement that they deserve, as the creators of the platform.
I’m very pleased with Sun’s execution of it all so far. For example, they’ve been very responsive to resolve questions about the licensing model from Java community members, who may not be familiar with the way the GPL or the Classpath exception works. They’ve done a great job on the FAQ for the OpenJDK project.
Now that there has been some time to think about things, and look at the detail, how has that reaction changed, if at all?
DT: The reaction has not changed, I’m still very happy and excited!
Have you had a look at any of the released code?
DT: Yes, I’ve played around with building HotSpot and javac.
I’ve found a handfull of small compiler warnings to fix, and ran pscan on the code to look for the simpler issues to fix. I’ll fax in my contributor agreement to get my first patches applied upstream.
What did you think of it, and how does it compare with the Kaffe/Classpath code?
DT: I looked at the small C portion of the HotSpot code, where I found the warnings I wanted to fix, and I like it. It’s reasonably easy to find one’s way around it, in particular using the new OpenGrok interface to the code at http://opengrok.neojava.org/hotspot
I’m pretty impressed by how warning-free the code builds on my system. There is a bunch of nice batches of code I’ll have to look at reusing inside Kaffe eventually, though since Kaffe is written in C and HotSpot is written in C++ that’s not necessarily going to be trivial.
It’s hard to compare HotSpot or javac code with Classpath, since they implement different things. On the other hand, compared to Kaffe, HotSpot code shows a lot more maintenance and implementation work going into it, and looks better documented. It is without doubt a great, unique contribution to Free Software.
If Sun hadn’t done this, how long do you think it would have taken the Free Software community to create a full Java implementation and VM?
DT: I think we would have been able to finish implementing 1.5 support in GNU Classpath next year, and many VMs using GNU Classpath already support the features introduced in 1.5.
But by then Sun would have released 1.6 already, and we’d have had to play catch up with the reference implementation of Java again. So, I’m happy the way things turned out, that we can work on Java 1.7 together.
In addition, there are many other interesting problems in the Java space, like deployment and modularity where being able to work together on Free Software solutions should help get the kind of input that helps improve the results for everyone.
Which of the Free Software implementations do you think held the most promise?
DT: It’s hard to pick a single one, since Cacao, gcj, IKVM, JamVM and JikesRVM, for example, all have a lot of good work going into them, partly because some of them are very promising research platforms, and partly since they have a very dedicated community behind them.
Kaffe is noticeably absent on this list, not since I don’t think it has a lot of promise, but since I think it’s more important to bring the projects we work together and share code with into the limelight. A lot of people have heard about Kaffe, and I think they should know about all these other nice Free Software runtimes as well. No single runtime can fit all sizes, and I regularly recommend that people check out those other projects as well. They may find a better solution for their specific problems.
As a Kaffe co-maintainer, I’ve been more focused on encouraging innovation to happen outside the Kaffe project, and bringing code from other projects into Kaffe, rather than trying to position the Kaffe project as the place where things need to happen.
My idea has always been that a diverse community of free VMs is the healthiest one, so I’m glad we’ve achieved that around GNU Classpath.
What is the most valuable aspect of Java for the Free Software community?
DT: There is a huge amount of Free Software written in Java that’s now going to be more readily accessible to users and Free Software developers. That means being able to package more software written in the Java programming language into GNU/Linux distributions, for example.
Do you think that we are more likely to see all Free Java development now focused on Sun’s version; or will we see Kaffe, GCJ, and others thriving because of the released code?
DT: I think we’ll see a bit of both. I hope that Sun will see some good contributions coming from this step, and will continue to build up an enthusiastic and passionate community around the code, like they’ve started with project Peabody, which encouraged community contributions.
I expect that Sun will see most contributions starting to pour in once the class library code is released, as most Java developers will be more familiar with Java, than with C++, or C.
Nevertheless, the way Sun is doing it, starting with the VM and the compiler, allows them to establish the necessary structures, and make sure everything is in place when the rush begins.
I also think that Kaffe, GCJ, etc. will thrive along with OpenJDK, moving toward more unique niches, while at the same time looking at ways to share code with Sun’s implementation; in particular class library code, but probably more bits and pieces over time as well.
We’ve always had a strong culture of giving back to where we take from around GNU Classpath, so I think it will all work out well.
Do you think much of the code and innovation from Kaffe, Classpath, GCJ, etc. will make its way in to Sun Java?
DT: I don’t think that will happen instantly, since Sun’s implementation, being the reference implementation, will very likely be maintained in a much more conservative fashion, than the more experimental free runtime projects.
But, since some of Sun’s class library may have encumbrances from third parties, I hope we’ll see the community outside Sun step in to help write replacements for that code. Some of the current work on GNU Classpath done by Roman Kennke and the rest of the team may help with that, for example.
That being said, I’d expect that new technologies coming from outside Sun, which the Java developer community desires to see in the JDK, will continue to go through the JCP and then into the JDK, eventually.
Have you ever looked at Mono/C#? If so, what did you think of it?
DT: Yes! I’ve actually seen Miguel de Icaza talk a few times, he has a great way of presenting his ideas, so I naturally went and checked out Mono a little bit.
Mono is a fun project. Miguel and the team had looked at Kaffe, and decided to try to write a better system, and afaict have done a very good job on making Mono into a nice, feature-rich runtime. Some of the ideas in Mono would make sense to introduce in Kaffe as well, like using glib for solving some of the standard problems when writing portable C code.
But one of the most impressive things about Mono is not the code, IMHO, it’s the dedicated community of developers trying to turn Mono into a better platform for development of Free Software on the GNOME stack then the alternatives.
What, to your knowledge, have Sun released under the GPL now; and how useful is that to the Free Software Community?
DT: They have released the JavaME reference implementation as PhoneME, the test harness for it as jtreg, the javac compiler, the HotSpot VM, and the Java Help library. In addition, Sun also added the GPL with the Classpath exception as a licensing option for the JavaEE reference implementation, project Glassfish.
In terms of ‘is there a full Free Software Java implementation from Sun’ the answer is now a clear yes for the ME and EE standards, with a significant part of the reference implementation of the JavaSE standard being released through HotSpot and javac. Until the class library arrives as Free Software in Q1 2007, that leaves some time to experiment with hooking HotSpot and javac into GNU Classpath, for example, and that’s what some developers have set out to do.
On the other hand, the ME and EE implementations are useful immediately. The Ubuntu GNU/Linux distribution is working on packaging the EE implementation for the next release, afaik, and I’ve already seen a build of PhoneME for OpenEmbedded’s port to the Zaurus PDA device.
Java Help and javac also play a role regarding packaging efforts around Sun’s Free Software IDE NetBeans, since NetBeans depends on those projects.
How useable is what they’ve released now? They describe it as an "early
build" of 1.7. Is it a very unstable version?
DT: I can’t judge the stability of the builds, as I’ve mostly just played around with the source code, rather than the binaries. I know that GNU Classpath developers have made Sun’s javac work on GNU Classpath, and used it to find a bug in GNU Classpath’s regular expression handling code, so that was quite usable. I’ve also seen someone post a build of the PhoneME JavaME implementation for OpenEmbedded on the Sharp Zaurus PDA, so I guess that’s quite usable as well.
Sun say that they will release a "JDK based nearly entirely on open-source code". For those of us who will exclude the resulting non-free parts, do you think the JDK will still be useful?
DT: Definitely. It is not clear at this point how much encumbered code, if any will be left over by the time the class libraries are released. If there are any such parts left over, we’ll have to write Free Software replacements for them, or improve the existing ones until they are good enough to replace the encumbered parts.
But for a lot of Free Software written in the Java programming language, those encumbered parts may not be necessary to use it, so the unencumbered parts will be a very useful contribution on their own for users of such software.
Sun say they are going to make the source for JDK 6 available once they’ve released a full JDK 7 as Free Software. Do you know whether the JDK 6 code will also be under the GPL?
DT: I don’t know. I guess it will be, if any possible, since the differences between JDK6 and early JDK 7 won’t be very large.
I could imagine distributions having an interest in taking the freed JDK 7 code and filling in whatever gaps were left over in a GPLd JDK 6 source code release, and then certifying their builds of that as Java(TM) 1.6 compatible, for example.
Do you think Free Software developers will embrace the JDK, and implement the parts that Sun have been unable to Free?
DT: That’s already happening in the context of GNU Classpath, to some degree. Sun has explained in the FAQs that the problematic encumbered portions of code lay in the areas of graphics and font rasterizers, and that’s where the commit activity seems to be happening in the last days. GNU Classpath could always use more volunteers for work on the class library, of course!
I think Free Software developers will embrace the JDK as a strong Free Software platform. The wealth of Free Software commons available on the Java platform shows that many Free Software developers have enjoyed working with the platform despite the drawback of having to rely on non-free software until suitable Free Software implementations around GNU Classpath became viable. Now that Java is being liberated, I’d expect it to be used by even more Free Software developers than before, as "the Java Trap" is a thing of the past.
In particular, I’d expect more Free Software developers to look into re-using libraries written in the Java programming language in their own projects, be they Java-based, or not. Java 7 should bring a push towards making the JVM a ubiquitous platform for all sorts of programming languages that need some kind of a runtime, and Sun has hired the JRuby lead developers to help bridge the gap between Ruby and Java using the JVM as the middle ground.
How much of a worry is the trademark on the name "Java"? Do you think Sun will cause problems and be over zealous with their control?
DT: In order to maintain compatibility, Sun only lets implementations that pass the certification process use the Java brand. That has not been a problem for the existing Free Software runtimes, since they avoided using Sun’s trademarks.
I don’t think that’s going to be a problem in the future, either. Sun has created a way for independent implementors to certify their implementations as compatible, and I’d expect those Free Software implementations that want to tap into the marketing power of the Java(TM) brand to certify. Apache Harmony, for example, is an implementation that’s been created with the explicit goal of getting an independent open source implementation Java(TM) certified.
There are certainly things I can imagine happening that would make the life easier for distributions wanting to certify their own builds as Java(TM) compatible, for example, like making the compatibility test suite, the TCK, readily available to such users, so that they can walk through the actual scholarship process faster. That’s probably going to be an interesting subject of discussion once the full JDK has been released.
But, given Sun’s very good execution so far, and the desire of all people involved in liberating Java on Sun’s side to do the right things the right way, I am not afraid of Sun being overzealous at all. They’ve been just plain great since we started talking on how to make this happen.
Of which Kaffe/Classpath achievement are you most proud?
DT: It’s the tightly knit community of Free Software developers around GNU Classpath, for sure. There is even a scientific paper describing the "permeable development" model we’re using to help each other benefit as much as possible from sharing.
That, and showing that there is a demand for Free Software runtimes for the Java programming language, and creating the circumstances which led to cooperation between ASF and FSF to address license compatibility issues in GPLv3, and connecting people worldwide working on liberating Java behind a common backbone in form of GNU Classpath, and many other things that only became possible because of that tightly knit community around the project …
But it’s really the people behind it all that I’m most proud of having the opportunity to work with. GNU Classpath is a really special project in that respect, I think.
I would like to thank Dalibor for taking time out to answer these questions. His position gives him a unique insight, and it was generous of him to give us the benefit of his expertise.
Wikipedia pages on the Free Java projects: