removing or using AWT/Swing
Wed Jul 26 18:22:00 GMT 2006
Tom Tromey wrote:
>>>>>> "Marco" == Marco Trudel <firstname.lastname@example.org> writes:
> Marco> I played a little with AWT/Swing with a 4.2.0 gcj (20060630,
> Marco> experimental). There raised two questions:
> On Windows? Or on Linux?
Sorry for beeing unclear. I'm testing on linux (wrote it somewhere, but
it's pretty hidden).
> Marco> I compiled gcc with "--without-x --disable-java-awt", but I saw
> Marco> multiple lines that told about compiling AWT and Swing stuff.
> --disable-java-awt merely disabled the AWT peer implementations from
> being built -- AWT itself is still built.
> It should be possible to disable most of AWT+Swing (with the exception
> of AWTPermission) without an enormous effort. However AFAIK nobody
> has done this in a way suitable for submission...
Ok, no problem. I was just interested how much smaller executables would
get. I don't really need it ;-)
> Marco> I wanted to check the current status of AWT/Swing. I tried with a gcj
> Marco> that wasn't compiled with any special AWT flag. A simple AWT frame gave
> Marco> this exception (I'm working on linux, awt is the executable name):
> Marco> Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit:
> Marco> gnu.java.awt.peer.gtk.GtkToolkit
> You built without peers, so there aren't any. If you're on Windows,
> then you basically need to figure out how to build the Gtk peers
> (unfortunately I don't think anybody has tried this on Windows yet).
> Nobody has written native Windows peers yet.
Then I guess the question is: how do I build with peers? I tested AWT
with a GCJ that was compiled with "--enable-java-awt=gtk" but get the
same error. Do I need an additional flag when compiling the final
> Marco> So, am I doing anything wrong or is AWT/Swing broken in the used gcj
> Marco> version? (I think this gcj works with gnu classpath v0.9).
> It definitely does work for me :-)
Hm, strainge. I'm working with suse linux 10.0. Do I need any additional
More information about the Java