roadmap

Thomas Reilly treilly@livesoftware.com
Thu Mar 4 10:18:00 GMT 1999


Well I don't know what Cygnus plans to do but I'm certainly interested
in getting Swing support in the gcj.

The Java 1.1 AWT classes use this peer architecture where java objects
map to native gui objects.  Swing doesn't use this peer architecture,
its %100 Java code that basically draws all the GUI components itself,
which is why its slower than death and in dire need of gcj.

So basically getting swing support is a matter of compiling all the
swing classes to native code using gcj (easy its pure Java) and
getting java.awt.* and java.awt.peer.* support into the gcj runtime
(not as easy).  I think Sun's Swing licensing is such that one could
compile swing.jar into swing.so in the gcj build process, however you
probably can't touch the swing source without treading into unsafe
waters.  In fact the best thing would probably be to leave it out of
the gcj runtime and if people want to use Swing they could pass a
configure argument when build the runtime that would take swing.jar
from an external location and turn it into a shared library.

Unfortunately CLASSPATH doesn't seem to be very far along with their
java.awt implementation.  If they were done we could just take their
java code as is, scrape the JNI layer off of their C code
implementation and replace it with a CNI layer and be done.

A faster strategy could be to use the BISS-AWT work that Kaffe uses.
Its GPL'd so I think its fair game unless the Cygnus guys don't feel
comfortable using stuff where Transvirtual owns the Copyright or
that's GPL'd instead of LGPL'd.

The BISS-AWT is also attractive because they don't use peers like Sun
did.  They did essentially what Swing did by implementing the
java.awt.* GUI objects in Java using lightweight components.  This
means that the BISS-AWT model doesn't need the power and glory of
GTK+.  Because they used lightweights the native code is merely a
handful of .c files that just use raw Xlib, these could easily be
rewritten with a CNI interface.

A not as fast but probably more ideal strategy would be to take the
BISS-AWT approach but do it from scratch using a simple lightweight
peer model based on CNI under the LGPL.  And instead of using Xlib use
the glib that GTK+ is based on because its supports win32.

The more I think about it that's probably the best way to do it.

What say the Cygnus Java hackers?

--
Tom Reilly
Live Software, Inc
http://www.livesoftware.com


More information about the Java mailing list