Hello everyone,
I have a problem, when I try to run a project in eclipse that uses GTK I get
the following error:
This is a println before Gtk.init()
Exception in thread "main" java.lang.UnsatisfiedLinkError:
/usr/lib/jni/libgtkjni-2.10.so: libglibjni-0.4.so: cannot open shared object
file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1030)
at org.gnu.gtk.Gtk.<clinit>(Gtk.java:214)
at org.testing.GTK_HelloWorld.main(GTK_HelloWorld.java:28)
I clearly have the libraries present in /usr/lib/jni because locate
libgtkjni && locate libglibjni returns:
/usr/lib/jni/libgtkjni.so
/usr/lib/jni/libgtkjni-2.10.so
/usr/lib/jni/libglibjni.so
/usr/lib/jni/libglibjni-0.4.so
I have a feeling that I need to manually add /usr/lib/jni to path somewhere,
I tried:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jni
and
PATH=$PATH:/usr/lib/jni
I also tried to add Native library location:/usr/lib/jni under project
properties in eclipse.
I'm using ubuntu feisty distribution, got java-gnome from repositories and
I'm using the following java version:
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0-b105, mixed mode)
Could anyone help me what else can I try?
Janko
|