This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Gnu Classpath on HP webOS : connexion problem between escher and X server / or loadling escher problem by Gnu classpath
- From: Mark Wielaard <mark at klomp dot org>
- To: Yannick <yleny at laposte dot net>
- Cc: java at gcc dot gnu dot org, classpath at gnu dot org
- Date: Wed, 11 Jan 2012 10:05:19 +0100
- Subject: Re: Gnu Classpath on HP webOS : connexion problem between escher and X server / or loadling escher problem by Gnu classpath
- References: <1259555306.23081.4.camel@bapbop> <4B13994B.4060604@redhat.com> <jeihuv$v8j$1@dough.gmane.org>
Hi Yannick,
The classpath list is probably the best to discuss this problem (CCed).
On Wed, 2012-01-11 at 00:30 +0100, Yannick wrote:
> When I launch the JRE and with Xterm started, I have the following error
> message :
>
> root@Palm Pre:/media/internal# /media/internal/opt/bin/jamvm HelloWorld
> -bootclasspath
> /media/internal/opt/share/jamvm/classes.zip:/media/internal/opt/share/classpath/glibj.zip:/media/internal/
> opt/share/classpath/escher-0.3.jar:/media/internal/opt/share/classpath/collections.jar
> HelloWorld -Dawt.toolkit=gnu.java.awt.peer.x.XToolkit HelloWorld
> Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit:
> gnu.java.awt.peer.gtk.GtkToolkit
> at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:607)
> at
> java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:103)
> at java.awt.Window.(Window.java:133)
> at java.awt.Frame.(Frame.java:246)
> at java.awt.Frame.(Frame.java:234)
> at HelloWorld.(HelloWorld.java:7)
> at HelloWorld.main(HelloWorld.java:5)
> Caused by: java.lang.UnsatisfiedLinkError: Native library `gtkpeer' not
> found
> (as file `libgtkpeer.so') in gnu.classpath.boot.library.path and
> java.library.path
> at java.lang.Runtime.loadLibrary(Runtime.java:763)
> at java.lang.System.loadLibrary(System.java:670)
> at gnu.java.awt.peer.gtk.GtkToolkit.(GtkToolkit.java:177)
> at java.lang.VMClass.forName(Native Method)
> at java.lang.Class.forName(Class.java:233)
> at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:583)
> ...6 more
> But here Gnu Classpath is not compiled to use libgtkpeer.so (c/C++ lib
> with Qt
> or GTK) but escher java lib.
See https://www.gnu.org/software/classpath/docs/hacking.html#SEC7
In this release you have to enable the X peers at runtime by
setting the system property
awt.toolkit=gnu.java.awt.peer.x.XToolkit by passing
`-Dawt.toolkit=gnu.java.awt.peer.x.XToolkit' to the java command
when running an application.
Running configure --enable-default-toolkit=gnu.java.awt.peer.x.XToolkit
should also work. That should probably be the default when configuring
with --disable-gtk-peer and --with-escher.
Hope that helps,
Mark