This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: AWT with static gcj


Hi. I have a somewhat similar problem. I'm running GCJ/GIJ
v4.2.0.20060826 on Ubuntu 6.06. The GCJ/GIJ was compiled with the
default settings. When I start a HelloWorldSwing application, I get
this.

Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit:
gnu.java.awt.peer.gtk.GtkToolkit
  at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:576)
  at java.awt.EventQueue.invokeLater(EventQueue.java:316)
  at javax.swing.SwingUtilities.invokeLater(SwingUtilities.java:949)
  at HelloWorldSwing.main(HelloWorldSwing.java:33)
Caused by: java.lang.UnsatisfiedLinkError: libgtkpeer: libgtkpeer.so:
cannot open shared object file: No such file or directory
  at java.lang.Runtime._load(natRuntime.cc:184)
  at java.lang.Runtime.loadLibrary(Runtime.java:655)
  at java.lang.System.loadLibrary(System.java:514)
  at gnu.java.awt.peer.gtk.GtkToolkit.<clinit>(GtkToolkit.java:142)
  at java.lang.Class.initializeClass(natClass.cc:750)
  at java.lang.Class.forName(Class.h:648)
  at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:560)
  ...3 more

Then I downloaded the libgtkpeer.so from Ubuntu's package website at:
http://packages.ubuntulinux.org/edgy/libs/classpath-gtkpeer

The above problem was solved, but now I get this problem:

gij: ../../../src/libjava/libltdl/ltdl.c:2473: tryall_dlopen_module:
Assertion `dirname' failed.
Aborted

Is there a way to solve this problem? Thanks.

dezumondo


On 9/21/06, Marco Trudel <mtrudel@gmx.ch> wrote:
Hello list

I use a --disable-shared --enable-java-awt=gtk GCJ, built two days ago
(revision 117030)...

When running a simple AWT application, I get:
Exception in thread "main" java.lang.UnsatisfiedLinkError: libgtkpeer:
libgtkpeer.a: cannot open shared object file: No such file or directory
    at java.lang.Runtime._load(bin)
    at java.lang.Runtime.loadLibrary(bin)
    at java.lang.System.loadLibrary(bin)
    at gnu.java.awt.peer.gtk.GtkToolkit.<clinit>(bin)
    at java.lang.Class.initializeClass(bin)
    at SwingMinimal.<clinit>(bin)
    at java.lang.Class.initializeClass(bin)
    at SwingMinimal.main(bin)

I have libgtkpeer.a in lib/gcj-4.2.0/ but when using it, I get:
Exception in thread "main" java.lang.UnsatisfiedLinkError: libgtkpeer:
./libgtkpeer.a: invalid ELF header

I assume that libgtkpeer.a is for shared applications but I need one for
static applications. But thats just a wild guess, I have really no idea...
Someone else having an one?


thanks Marco



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]