Exception in thread "main" java.lang.UnsatisfiedLinkError: xxx()V

Exception in thread "main" java.lang.UnsatisfiedLinkError: com.vipsoft.demo.JNIDemo.testHello()V
    at com.vipsoft.demo.JNIDemo.testHello(Native Method)
    at com.vipsoft.demo.JNIDemo.main(JNIDemo.java:10)

Process finished with exit code 1

是因为java 程序在调用dll时候,不能找到native method 方法的实现。

主要是因为在dll中,可能xxx.h头文件中的接口名和xxx.cpp源文件中的实现函数名不一致导致的。

原文地址:https://www.cnblogs.com/vipsoft/p/15632927.html