我现在的程序,要用第三方提供的DLL文件,文件为EMPF.DLL,
测试代码如下,但会出现java.lang.UnsatisfiedLinkError: EMPFSend这个错误,
我在网上也搜了一些,但还是不行。
还望帮忙,谢谢了!
package send;public class LoadDll {
static {
System.loadLibrary("EMPF");
}
public native static int EMPFSend(String EUserID,String EUserPass,
String ESerial,Integer ESendNO,String num);
}package send;
public class Test{
public static void main(String[] args){
LoadDll dll = new LoadDll();
int stdcall = dll.EMPFSend("user","password","sendSeq","sendNO","sendNum");
}
}
测试代码如下,但会出现java.lang.UnsatisfiedLinkError: EMPFSend这个错误,
我在网上也搜了一些,但还是不行。
还望帮忙,谢谢了!
package send;public class LoadDll {
static {
System.loadLibrary("EMPF");
}
public native static int EMPFSend(String EUserID,String EUserPass,
String ESerial,Integer ESendNO,String num);
}package send;
public class Test{
public static void main(String[] args){
LoadDll dll = new LoadDll();
int stdcall = dll.EMPFSend("user","password","sendSeq","sendNO","sendNum");
}
}
至于示例网上放狗搜,一大把。
2.要将你要加载的动态库的依赖库都得放到$java_home/lib里,
我就是这样实现的