Exception in thread "main" java.lang.UnsatisfiedLinkError: /net/user3/manoyes/Desktop/jnitest/libsetstruts.so: /net/user3/manoyes/Desktop/jnitest/libsetstruts.so: undefined symbol: XOpenDisplay
This means you are trying to call a function that does not exist in the library libsetstruts.so.
@AkiraCrosshair: Another reason you might get an UnsatisfiedLinkError is because Java can't find the native library. Java uses the variable java.library.path to look for native libraries. You can specify it on the command line when you run your Java program like this:
Code:
java -Djava.library.path=/dir/that/contains/nativelib com.mypackage.MyProgram
Bookmarks