jni - System.loadLibrary failing on java 1.6 but working on java 1.5 -



jni - System.loadLibrary failing on java 1.6 but working on java 1.5 -

i have ran peculiar problem on aix 6.1 , sles 11 . trying load so file in java using system.loadlibrary() call. below sample program:

public class jnitest { public static void main(string[] args) { seek { system.loadlibrary("libsample.so"); system.out.println("loaded!!!"); } catch(unsatisfiedlinkerror e) { system.out.println("unsatisfiedlinkerror"); } }

when compile piece of code java 1.5 works properly. when compile java 1.6 says unsatisfiedlinkerror. don't understand how perchance getting error. way running is:

javac jnitest.java java -djava.library.path=. jnitest

the so file place in current directory running code. before this, things have tried:

giving absolute path - didn't work

using runtime.getruntime().loadlibrary() - didn't work

any thought doing wrong?

i don't think you're supposed have ".so" extension when using jni. seek system.loadlibrary("libsample");

java jni aix

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -