GCC 4.0

Been playing with the CVS version of GCC (which will become GCC 4.0 – note to self, update the libgcj portion with all the GNU Classpath updates that have gone in) and the result is stunning! Tom Tromey had shown how to create a pre-compiled version of Eclipse 3.0. It is really easy now to pre-compile anything (the pain is compiling RHUG first, but the work on GNU JAXP will make this a lot easier.)

I have been using gcj precompiled Eclipse with kaffe as JRE to see how easy it would be to mix and match running with a native gcj Eclipse version and using some other runtime as execution engine for the created programs. That works just fine. (There is also a gcjbuilder Eclipse plugin that integrates the native GCJ compiler within Eclipse build infrastructure.) I had never been very impressed by Eclipse since I had only ran it with interpreters till now and then it feels a bit sluggish. But this thing is fast! Startup is under 10 seconds (even with multiple projects open). Importing GNU Classpath (and building it all) just takes seconds. Editing feels smooth and autocompletion works instantly.

Now that some of the other runtimes have also been able to work with this large program it will be fun to see how quickly we can shake out all the bugs. Then we must follow the lead of the Debian hackers and build the whole thing from source!

Back

Back from the summit in Boston. Will post an overview soon. For now take a look at the picture plus writeup of Richard Li (one of the ACS/RedHat CMS people).

The Eclipse Tipping Point?

Apparently everybody but me had seen the discussion on GCJ, Native Java Compilation and Eclipse by David Orme. It is an interesting read. And it is good to see others are also dreaming of the same kind of future we are working on. The only piece missing in this story seems to be java-gnome which I think is the real “lynchpin” to be honest. Using Eclipse as IDE to create new free software with gcj build around native java-gnome applications (with glade for example) seems like a winner to me.

Putting two and two together

Build and Run!

GNU Classpath – All together

Always wanted to know how those people writing on Planet Classpath and those hard working GNU Classpath hackers looked liked?

Please let me know if you want another picture in there or if that picture isn’t you, but some random other person with the same name on the internet.

java-gnome

Happy to see so much positive feedback to Mark Howard’s post about the java-gnome status.

One reply was really interesting since it came with a presentation ”From thin clients to web apps and back again”. The part on Development Technology explains the platform (GNU/Linux – liveCDs), programming language (java), widget-set (java-gnome), and development platform/runtime (gcj), the alternatives and why this set was chosen. Worth a quick read.

02 Oct 2004

Advogato

When advogato was down a couple of months ago I moved my diary to my own site. Which also hosts Planet Classpath. I should probably try to cross post my dairy on advogato since it is a nice community.

gcj

Saw that rbultje had some trouble with GNU gcj. It is always painful to see someones first steps with one of your projects be so hard. Especially since he hit a long standing usability bug. The solution to your problem was to do:

cd ..
gcj -o myapp application/*.java --main=application.Application

But that probably only makes sense if you know a little bit more about how gcj (and java in general) puts modules (packages) in directories, but uses dot (.) in source files or when indicating classes in a package on the command line.

Not being able to find the GTK+ AWT libraries is strange though. If you installed gcc yourself then you need to configure with --enable-java-awt=gtk, --enable-java-awt=xlib for the pure xlib version or, if you want both, --enable-java-awt=gtk,xlib. Normally distributions do already ship packages like this. If you are using Debian unstable then please note that the current libgcj5-awt package is broken in testing/sarge. This should be solved by the package in unstable that hopefully enters testing before the freeze.

Please send an email to the mailinglist if you have trouble with gcj. Or drop by on #gcj on irc.oftc.net. There are always people there that might be able to help and get you through your first steps in a couple of minutes. You don’t have to spend hours struggling on your own.

New screenshots, demo code and gcc performance

Grzegorz posted some free swing screenshots to show what is possible now with compilers and runtimes based on GNU Classpath 0.11 (which he is integrating into SableVM now). These are mostly random pieces of (“real world”) swing code that now also work with our implementation.

GNU Classpath 0.11 also comes with GNU Classpath Examples which tries to provide a real complete demo environment for Free Swing, and AWT. The nice thing about GNU Classpath Examples is that it shows real working code that you can use now with any GNU Classpath based environment. We need more such examples. Paul Fisher gave me the source code for a simple Animator applet that I will integrate soon. But simple examples of how to use Collections (java.util), Regular Expression (java.util.regex), IO Streams (java.io), Internationalisation (java.text), 2D graphics (java.awt.geom), database access (java.sql) etc. etc. would all be really appreciated. I hope that when GNU Classpath 1.0 is finally released it will come with lots of example code that shows how big, powerful and easy to use our library actually is.

Both Robert and Grzegorz have noticed that JamVM and SableVM, and I guess all interpreter like code, degrades a bit with newer GCC releases. Interested GCC developers might want to read the analyses of Robert for JamVM and the analyses of Grzegorz for SableVM.

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.