Re: [Java-gnome-developer] errors
Brought to you by:
afcowie
From: Damien C. <da...@co...> - 2003-12-14 13:12:41
|
I've included my classpath and details of how I am compiling/running. Hope you can help. Alex Moreno wrote: >It seems that your classpath is not correct. You should make >CLASSPATH='/usr/java/j2sdk1.4.2_02/jre/lib/ext'. And with an only 'java >First' it shoul work. The '-cp .' argument is not necessary because java >includes the working directory by default. > >Try to fix it or send us your 'echo $CLASSPATH' to let us help you. > [damien@localhost GnomeApp]$ echo $CLASSPATH /usr/share/java-1.4.2:/usr/share/java-gnome:/usr/share/java-1.3.1:/usr/java/j2sdk1.4.2_02/jre/lib/ext/:/usr/java/j2sdk1.4.2_02/jre/lib/ext/:. [damien@localhost GnomeApp]$ javac First.java [damien@localhost GnomeApp]$ java First Exception in thread "main" java.lang.UnsatisfiedLinkError: no GTKJava in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:834) at org.gnu.glib.GObject.<clinit>(GObject.java:154) at First.main(First.java:10) > >On Tue, 2003-12-16 at 10:22, Damien Covey wrote: > > >>Hi, >> >>I'm new to Java-gnome and I am trying to get up and running. >> >>I'm attempting to run the simplest of programs from the Java-gnome >>tutorial : >> >> >> >>>// First we import the libraries used by this example >>>import org.gnu.gnome.App; >>>import org.gnu.gnome.Program; >>>import org.gnu.gtk.Gtk; >>> >>>public class First { >>> >>> public static void main(String[] args) { >>> // Initialization >>> Program.initGnomeUI("First", "0.1", args); >>> >>> App app = new App("First", "First App"); >>> app.show(); >>> >>> Gtk.main(); >>> } >>>} >>> >>> >>I can compile this easy enough with javac First.java. >>However when I try to run java -cp . First is get: >> >> >> >>>[damien@localhost GnomeApp]$ java -cp . First >>>Exception in thread "main" java.lang.UnsatisfiedLinkError: no >>>GTKJava in java.library.path >>> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491) >>> at java.lang.Runtime.loadLibrary0(Runtime.java:788) >>> at java.lang.System.loadLibrary(System.java:834) >>> at org.gnu.glib.GObject.<clinit>(GObject.java:154) >>> at First.main(First.java:10) >>>[damien@localhost GnomeApp]$ >>> >>> >>Does anyone have any ideas about how to fix this? >>I have build java-gnome and places all the .jar 's in >>/usr/java/j2sdk1.4.2_02/jre/lib/ext. >> >>Regards >> >>-- >>Damien Covey >> >> -- Damien Covey www.covey.net.au |