AWT with static gcj

Marco Trudel mtrudel@gmx.ch
Thu Sep 21 00:26:00 GMT 2006


Tom Tromey wrote:
>>>>>> "Marco" == Marco Trudel <mtrudel@gmx.ch> writes:
> 
> Marco> When running a simple AWT application, I get:
> Marco> Exception in thread "main" java.lang.UnsatisfiedLinkError: libgtkpeer:
> Marco> libgtkpeer.a: cannot open shared object file: No such file or directory
> Marco>     at java.lang.Runtime._load(bin)
> Marco>     at java.lang.Runtime.loadLibrary(bin)
> Marco>     at java.lang.System.loadLibrary(bin)
> 
> The Gtk AWT peers use JNI and are dynamically loaded, via
> System.loadLibrary, when the peer code is activated.

Ok, sounds good so far.


> In a --disable-shared build, there is no libgtkpeer.so that can be
> loaded dynamically.

So, libgtkpeer.a is for the shared GCJ and libgtkpeer.so for the static? 
Why isn't libgtkpeer.so built then?


> So, it dies.  I don't know why you get that
> particular error message, it seems weird to me.

I don't know the actual problem. So I don't know how it looks :-/


> You could try using libltdl's preloading support to get around this.
> I have never tried it with libgcj but I suppose it could work.

Sounds like a hack to me... What is the actual problem? Does GNU 
classpath only support shared build?


thanks
Marco



More information about the Java mailing list