GNU Classpath 0.11 developer snapshot

We finally managed to release the GNU Classpath 0.11 developer snapshot. Highlights:

Inclusion of full javax.crypto, javax.security, javax.net and subpackages. Complete implementation of java.awt.geom. GTK+ 2.4 AWT peer implementation for AWT FileDialog, better java.awt.image LookupTable, Kernel and BufferedImage support. AWT 1.0 Event Model implemented. New Swing classes (Spring, SpringLayout, JMenu, JPopupMenu, JColorChooser, JComboBox, JTextField, internal JFrame support and start of JTable and JTree implementations). The Collection classes have seen extensive documentation updates. GNU Classpath Examples have been added – a GPLed demo framework for AWT and Swing.

And that is just the big things.
Progress has been amazing these last two months. 26 people contributed real code and were mentioned in the ChangeLog. Mauve now has 17102 tests of which we pass 16816. GNU Classpath 0.11 is 235,380 SLOC according to SLOCCount, which is (ignoring the external directory since GNU JAXP is now a separate package) almost 30.000 SLOC more than 0.10, or (using the Basic COCOMO model) a bit more than 8 person months of work. Not bad for two months real time. That is 180+ CVS commits in two months, which means on average 3 commits each and every day (including holidays and weekends).

Sadly I have still not recovered completely from a hard disk failure last month. So I only stress tested 0.11 on JamVM (it works out of the box with the 1.1.4 and the new JamVM 1.2.0 release). But it should also work out of the box with kissme (which really could see a new release since CVS is a lot better than the latest release) and jikesrvm. Steven reported success with JikesRVM and Eclipse 3.0 last Friday, which is good news since although it starts up now on GNU Classpath based runtimes it doesn’t actual run very well yet. Tom Tromey also reports about getting Eclipse working with the gcj BC ABI branch from time to time, but it is not clear whether this is 2.1 or 3.0.

(GNU Classpath Hacker Hint: If you already have jamvm installed, it ships with Debian these days, you can easily make it use a GNU Classpath CVS build by giving it -bootclasspath/p /usr/local/classpath/share/classpath/glibj.zip -Djava.library.path=/usr/local/classpath/lib/classpath.)

Work is already on the way to make the 0.12 snapshot release another big improvement.
Casey submitted his jar signature verification code, Jerry Quinn submitted patches to improve java.awt.image ColorModel and Raster, David has added even more Mauve test (just committed about 850 new tests and more are in the queue), rumor has it that Michael has part of the javax.imageio framework done which, Anthony created a free jnlp api and Peter, one of the JAmiga hackers, is working on a free KVM compatible classpath library and Tom seems to happily add more and more of the generics framework.

Go team! Go!

More java.awt.geom, more JFreeChart

Cleaned up my ugly hacks, Graydon Hoare explained which asserts were real and which were bogus, Michael Koch created a real patch for TextArea and I added the latest java.awt.geom work from Sven de Marothy to the gcj gui branch. A nice screen shot of a Pie chart, Meter chart, Compass plot and a Wafermap chart show that much more of JFreeChart is now working. It is still very slow and not all charts show up correctly, but it is a very nice start.

To play with this you have to follow the instructions of Thomas Fitzsimmons on Creating a GCJ-based Java GUI development environment with JHBuild which will give you a gcj gui branch build with the latest cairo Graphics2D support. Then you can just download JFreeChart and run the demo with gij -Dgnu.java.awt.peer.gtk.Graphics=Graphics2D -classpath jfreechart-0.9.20-demo.jar:jfreechart-0.9.20.jar:lib/jcommon-0.9.5.jar org.jfree.chart.demo.JFreeChartDemo

Now back to my real work, preparing a new GNU Classpath snapshot, which will hopefully contain much of the above new stuff.

Documentation, tests and JFreeChart

GNU Classpath is going very strong. We got a couple of new hackers helping out and some of them concentrate on Documentation and Testing of the whole library. One of them is David Gilbert of JFreeChart fame. He has written hunderds of new Mauve tests. This has not only found a couple of bugs in our library implementation, but it also makes us sleep a little better. It is comforting to know that if we make mistakes in the future there will be ten thousand mauve tests waiting to point out any new regressions.

Since I know David would like to see JFreeChart part of a complete Free Software stack I made sure that we can at least run the JFreeChart demo program on the gcj-gui branch. The screenshot looks very nice. Unfortunately it isn’t production ready yet. I needed to make a couple of ugly hacks to work around some text (pango) issues when cairo is enabled. It needs the (currently not default) –enable-gtk-cairo configure flag to build the cairo Graphics2D implementation on GTK. And then you need to run the program with the right system property set to get your AWT Components a real Cairo based Graphics2D object with gij -Dgnu.java.awt.peer.gtk.Graphics=Graphics2D. As you can see on the screenshot there are still a couple of visual bugs in our library. And it is actually pretty slow. But seeing such a large and cool free software library starting to work together with GNU Classpath and gcj is really satisfying. I’ll try to clean up my hacks and get it all into CVS soon so we can play with this a bit more when the GNU Classpath 0.11 snapshot is made on Monday. But no promises since some of the workarounds I needed are pretty ugly and I can imagine Graydon objecting to his code being vandalized like I did. (There might have been a reason for those asserts triggering, and just removing them might not be the cleanest solution…)

Documentation Jdocs

Since people seem interested in this topic and since Rick of javalobby contacted me about it I wrote up a little summary of GNU Classpath APIs and documentation (it is the 5th entry).

Progress

Inspired by A Brief History of GNU Classpath created by Casey Marshall I looked at the actual lines of source code of GNU Classpath. Running SLOCCount on the releases of the last year gives:

Release Date SLOC
0.06 09 Sep 2003 185,803
0.07 05 Dec 2003 192,296
0.08 13 Mar 2004 200,471
0.09 02 May 2004 211,736
0.10 12 July 2004 225,049
CVS 17 Aug 2004 253,023

That means that in the last year GNU Classpath has grown with 67220 physical Source Lines of Code. SLOCCount automatically substracts comments and duplicate/similar pieces of code (the FindBugs paper said GNU Classpath 0.08 was 457 KLOC, but they just used wc -l on all the .java source code files, which gives a much higher number, but not a fair realistic one). So on average over the last year we have been growing at more than 190 lines of pure source code each and every day (including holidays and weekends).

If you want to see a nice overview of the progress that has been made please check out Jim Huang his presentation free-java-debian. It is in traditional chinese, so make sure you have some chinese fonts installed (xpdf displays the .pdf nicer than gpdf for me and OpenOffice gives some warnings opening the .ppt file, but renders it really nicely). But even you are not fluent in Chinese read it! It includes pictures of the different AWT backends (check out kawt – DirectFB AWT backend!), Odonata, GCJWebplugin + Frozen Bubble applet, native eclipse + kaffe integration, Kaffe + GL/SDL, J2ME (MIDP) MicroEmulator, SwingWT, Charva, Tomcat5 management console, X-Smiles, JavaTV (ftv) on kaffe, KOE/XEO (including webbrowser!), GTK+ 2.4-based AWT/Swing and Java-GNOME. Even if you think you know everything there is out there in the free software world written and deployed on free java-like environments these pictures will surprize you. And the English slides give a nice overview of the dangers of proprietary/SCSL licensing, an overview of GNU Classpath, gcj, kaffe, IKVM and JC VM and benchmarks between the different free and proprietary runtimes (including Latte!).

GUI work (AWT/Swing)

Made a long post to the GNU Classpath mailinglist describing all the nice GUI work (AWT/Swing) going on recently. The best summary is probably the screenshots and slides from Thomas Fitzsimmons his GCJ and the Desktop talk at the Desktop Developers’ Conference and the new screenshots of the new AWT Demo and Swing Demo we include in GNU Classpath now.

Status reports

Ranjit asked for status reports. But I don’t have anything to report (since I am still not finished with the big gui update). So I will just point to the Kaffe plans of:

The Kaffe hackers seriously rock. And the cool thing is that when Jim finishes that last point of his plan (upgrade server hardware) the Kaffe, GNU Classpath, GNU Crypto and GCJ hackers will pull together some resources to work even more closely together!

GCJ and the Desktop

The first report of Thomas his talk given at the Desktop Developers’ Conference is in.

Somebody’s Acting Like A Child

John Mayall & The Bluesbreakers were in the Melkweg today.

Viewing pleasure

As I said before we need to get Thomas Fitzsimmons his own blog.
Here is what he just posted to the mailinglist:

Hi,

With my latest round of AWT patches we can now run Slime Volleyball –
in my opinion the best game on the web ;-) I’ve posted some screenshots
for your viewing pleasure:

http://people.redhat.com/fitzsim/slime-volleyball-1-2004-07-12.png
http://people.redhat.com/fitzsim/slime-volleyball-2-2004-07-12.png
http://people.redhat.com/fitzsim/slime-volleyball-3-2004-07-12.png

Enjoy,
Tom

So get yourself some of that jhbuild gcj gui branch goodness and start playing!