Re: [Java-gnome-developer] Strange problem...
Brought to you by:
afcowie
|
From: Jeffrey M. <ku...@zo...> - 2002-05-11 23:50:50
|
The reason you are having the problem described below is because the java-gnome shared objects cannot be found and thereby loaded by the jvm. The files are located in the lib directory of the java-gnome distribution. There are two ways you can solve this problem. The easiest is to make sure the directory of these files is in your LD_LIBRARY_PATH. For example, if they are located in /usr/local/share/java-gnome/lib you can define an environment variable like the following: export LD_LIBRARY_PATH=/usr/local/share/java-gnome/lib Another way to solve this problem is to provide the path to the library to the jvm directly. You could type: java -Djava.library.path=/usr/local/share/java-gnome/lib myclass Please let me know if this solves your problem. -Jeff On Sat, 2002-05-11 at 14:30, [A]ndy80 - Andrea Grandi wrote: > After: javac First.java (I get NO errors) > I do: java First > and I get: > > [shady@piccoli java]$ java First > Exception in thread "main" java.lang.UnsatisfiedLinkError: no GTKJava in > java.library.path > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1410) > at java.lang.Runtime.loadLibrary0(Runtime.java:772) > at java.lang.System.loadLibrary(System.java:832) > at gnu.gnome.Gnome.<clinit>(Gnome.java:35) > at First.main(First.java:9) > > then I try: > > [shady@piccoli java]$ java -cp /usr/local/share/java-gnome/ First > Exception in thread "main" java.lang.NoClassDefFoundError: First > > what could be the reason? |