Exception in thread "main" java.lang.UnsatisfiedLinkError: no CplusImplement in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at com.cjzheng.service.TestMain.main(TestMain.java:20)
1
2
3
4
5
解决方案:确认该dll文件名是否正确,是否在环境变量中添加了可以找到该dll的变量。
2、方法名不对,或者参数个数不对,或者参数形式不对(这里是博主另外一个项目的错误)
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.cjzheng.util.CPlusMethod.SAASChooseAntenna(DDDDDDDDDD)I
1
3、由于A机子上不同C++编译器生成的dll,在B机器上缺少相应的dll文件导致错误;
Exception in thread "main" java.lang.UnsatisfiedLinkError: D:\Program Files\Java\jdk1.8.0_60\bin\CPlusMethod.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1880)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at com.cjzheng.util.CPlusMethod.<clinit>(CPlusMethod.java:12)
at com.cjzheng.service.impl.TestMain.main(TestMain.java:21)