Re: [Java-gnome-developer] errors
Brought to you by:
afcowie
From: Alex M. <ale...@fa...> - 2003-12-14 13:16:00
|
Hi, it seems that your classpath is not correct. You should makeCLASSPATH='/usr/java/j2sdk1.4.2_02/jre/lib/ext'. And with an only 'javaFirst' it shoul work. The '-cp .' argument is not necessary because javaincludes the working directory by default. Try to fix it or, if you continue having problems, send us your 'echo $CLASSPATH' to let us help you. > 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 -- Alex Moreno |