Java JNI trouble
I have the .java, .class, .cpp, .开发者_开发百科h files: http://www.ibm.com/developerworks/java/tutorials/j-jni/section2.html
After reading TotalFrickinRockstarFromMars's comment, I tried setting up classpath.
What's wrong?
Sample1.dll IS there.Text version:
F:\workspace\JavaJNIProj\src>java Sample1
Exception in thread "main" java.lang.UnsatisfiedLinkError: F:\workspace\JavaJNIProj\src\Sample1.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at Sample1.main(Sample1.java:10)
It looks like you miss some dependency DLLs. You can download DependencyWalker http://www.dependencywalker.com/
This supposed to help you to find it.
精彩评论