java中如何调用这样的DLL接口 本帖最后由 herofour444 于 2013-01-30 21:46:14 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 1、导入dll到工程的相对路径。2、生产dll的原生函数。就可以了。参考如下:public class TestNative { private native static int Max(int a, int b); private native static String GetLicense(String a); public static void main(String[] args) { TestNative license = new TestNative(); System.out.println("lll:" + license.getMaxNum()); System.out.println("hd:" + license.GetLicense()); } static { System.loadLibrary("A3"); } public int getMaxNum(){ return Max(4, 5); } public String GetLicense(){ return GetLicense(""); }} 这个this是什么意思? 谁做过农行接口吗? 关于使用java语言将页面表单信息导出为world格式的文件 clob问题请教 hibernate inner join查询结果问题 帮帮忙 如果月薪要达到1000,要具备什么样的技术? struts的问题 socket编程的问题--java是不是做不到? 急问给分?,不够还给 程序员的情书 请教Hibernate 如何定义“库房”、“库存调拨”的OneToMany关系?
2、生产dll的原生函数。就可以了。
参考如下:
public class TestNative {
private native static int Max(int a, int b);
private native static String GetLicense(String a); public static void main(String[] args) {
TestNative license = new TestNative();
System.out.println("lll:" + license.getMaxNum());
System.out.println("hd:" + license.GetLicense());
} static {
System.loadLibrary("A3");
} public int getMaxNum(){
return Max(4, 5);
}
public String GetLicense(){
return GetLicense("");
}
}