Question for the AWT guys

Tom Tromey tromey@redhat.com
Mon Sep 16 09:54:00 GMT 2002


>>>>> "Michael" == Michael Koch <konqueror@gmx.de> writes:

Michael> I tried to write a little AWT hello world app. Compiling it
Michael> with gcj works fine. The problem is that each startup of the
Michael> app with gij fails with the following error:
The AWT runtime support isn't finished. In fact barely any exists in
the tree; even in Classpath the peers aren't complete.
Michael> When I did "make libgcjx.la" the compile failed shortly after
Michael> starting in natClip.cc with:
I'm not too surprised. This code was never complete. And since
nobody works on it, it has probably suffered from bit rot as well.
Michael> Now the question: How do get a simple AWT app working with
Michael> libgcj from CVS trunk branch ? is it possible or what needs
Michael> to be done to make this work ? Any hints ? I'm willing to do
Michael> some work there.
On those occasions that I've worked on AWT, I've used the peers that
are part of Classpath. I think these represent the quickest path to
getting a working AWT.
It isn't too hard to set these up. I make a new directory holding the
gnu.java.awt.image.* files from Classpath that aren't already in
libgcj. I also put the Classpath gnu.java.awt.peer.gtk.* files in
this tree. Then I compile them all with "gcj -fjni -shared". I put
these into a .so and set LD_LIBRARY_PATH to point at this .so and also
the native peer .so from Classpath. After this you can build the
Classpath TestAWT application and try it out.
Some of it works. However, there are still a lot of problems. Many
things fail. There are a lot of debugging prints in the code. There
are missing pieces. There are bugs in the Java code (some severe; for
instance the existing Java code doesn't use the tree lock anywhere).
So, there's a lot you could fix if you're interested.
The approach I've taken, generally, is:
* If the bug is in the Classpath code, I check it in there
* If the bug is in the shared AWT code, I check it in in both trees
Ultimately I assume we'll import the Classpath peers into our tree.
Sometimes people talk about porting these peers to use CNI instead of
JNI. While I think that makes sense, I think there's plenty to do
before worrying about that. That would be my last step.
Tom


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /