在JAVA中该如何调用dll库中的函数,来执行库函数功能呢,请诸位助我! 在JAVA中该如何调用dll库中的函数,来执行库函数功能呢,请诸位助我! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 使用JNI技术啊,前提是dll中的方法只是java native方法的实现,若java中没有定义的native方法,是不能在java中调用的。public class test{ public native void show(); static{ System.loadLibrary("test"); } public static void main(){ new test().show(); }}编译后产生test.class, 使用javah -jni -classpath . test 生成c类型的头文件test.h在VC中创建一个dll project, 实现test.h中给出的接口就行了。 那每个库函数怎么调,来使用呢在JAVA中 还要自己在VC里编写代码吗?可我不会用VC哦 急! 求一个 Java 并行程序 不是并发程序 兽医请教曲线拟合问题 基本数据类型和引用类型的在内存中的分配 求达人帮忙 找找错误 再线等 JInternalFrame的问题 请问show()和setVisible(true)有什么区别吗? 菜单被覆盖怎么弄啊? !!!关于字符串的连接问题!!!!!!!!!!!!!!! 请教对于空的字符串怎么进行比较? Applet与IE通信问题 新手问路 Eclipse崩溃了,换盘符重装也不行
public native void show(); static{
System.loadLibrary("test");
} public static void main(){
new test().show();
}
}编译后产生test.class, 使用javah -jni -classpath . test 生成c类型的头文件test.h
在VC中创建一个dll project, 实现test.h中给出的接口就行了。