Java JNI麻烦

时间:2011-06-16 19:42:58

标签: java path java-native-interface

我有.java,.class,.cpp,.h文件:http://www.ibm.com/developerworks/java/tutorials/j-jni/section2.html

在阅读TotalFrickinRockstarFromMars的评论后,我尝试设置classpath。

怎么了?

lala Sample1.dll就在那里。

文字版:

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)

1 个答案:

答案 0 :(得分:0)

看起来你错过了一些依赖DLL。您可以下载DependencyWalker http://www.dependencywalker.com/

这应该可以帮助你找到它。