Almost there... (episode 2)

Mark Wielaard mark@klomp.org
Sat Jul 27 03:46:00 GMT 2002


Hi,

On Fri, 2002-07-26 at 12:39, Norman Hendrich wrote:

> "cannot load AWT Toolkit: gnu.java.awt.peer.gtk.GtkToolkit"
> ... <stack trace deleted>
> 
> Obviously, I forgot about static object initialization... 
> I am still confident that I don't actually need any windows, just 
> Toolkit and perhaps some Font initialization.
> 
> I seem to remember that there was some magic involved to getting
> either the gtk or the Xlib peers built. Unfortunately, I can not
> find that info neither on the GCJ help pages nor searching this list.
> The most recent message I found is not very helpful and certainly
> not encouraging:

The default awt toolkit is wrong in gcj it is either
gnu.awt.gtk.GtkToolkit or gnu.awt.xlib.XToolkit. You should be able to
set the AWT toolkit used with -Dawt.toolkit=gnu.awt.gtk.GtkToolkit. But
that also doesn't seem to work :(

> * This is the first time ever that I tried to add new classes to the
>   gcc/gcj build process. Is it correct to just add new class entries
>   in libjava/Makefile.in and then rebuild?

Basically yes (you should actually add them to Makefile.am and run the
magic automake, but changing Makefile.in by hand should also work). See
also the HACKING file.

> * added java.awt.print.* classes from Classpath, editing Makefile.in
> 
>   Compiling works, but the new classes are not included in libgcj.so...
>   What happens?

Not sure, but probably you need to do the whole automake thing described
in the HACKING file.

> * three classes in my code use a GIFEncoder.GIFEncoder package which I 
>   found a long time ago on Gamelan.
>   
>   gcj fails to compile those classes both from source and from classes.
>   Given the GIF licensing issues, I should probably not send you those
>   offending classes, or should I?

If it is free software please put it somewhere where we can download it
and see why gcj fails to compile it. We won't use it to generate gifs,
just as some generic test code :)

Thanks,

Mark



More information about the Java mailing list