From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29976 invoked by alias); 11 Jan 2012 09:05:38 -0000 Received: (qmail 29967 invoked by uid 22791); 11 Jan 2012 09:05:37 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,TW_GT X-Spam-Check-By: sourceware.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (80.101.103.228) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 11 Jan 2012 09:05:23 +0000 Message-ID: <1326272719.30984.18.camel@springer.wildebeest.org> Subject: Re: Gnu Classpath on HP webOS : connexion problem between escher and X server / or loadling escher problem by Gnu classpath From: Mark Wielaard To: Yannick Cc: java@gcc.gnu.org, classpath@gnu.org Date: Wed, 11 Jan 2012 09:05:00 -0000 In-Reply-To: References: <1259555306.23081.4.camel@bapbop> <4B13994B.4060604@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 X-Spam-Score: -2.9 (--) X-IsSubscribed: yes Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2012-01/txt/msg00003.txt.bz2 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 : >=20 > root@Palm Pre:/media/internal# /media/internal/opt/bin/jamvm HelloWorld > -bootclasspath > /media/internal/opt/share/jamvm/classes.zip:/media/internal/opt/share/cla= sspath/glibj.zip:/media/internal/ > opt/share/classpath/escher-0.3.jar:/media/internal/opt/share/classpath/co= llections.jar > HelloWorld -Dawt.toolkit=3Dgnu.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(GraphicsEnvironm= ent.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=3Dgnu.java.awt.peer.x.XToolkit by passing `-Dawt.toolkit=3Dgnu.java.awt.peer.x.XToolkit' to the java command when running an application. =20=20=20=20=20=20=20=20 Running configure --enable-default-toolkit=3Dgnu.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