如何在java applet中调用外部dll。 [英] How to call external dll in java applet.
本文介绍了如何在java applet中调用外部dll。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨..我有一个dll文件我想在我的java applet中加载该外部文件,并在java applet中调用与该dll相关联的函数。怎么做,请帮助我..
Hi .. I have one dll file i want to load that external file in my java applet and call the function associated with that dll in java applet . How can do this , Please Help me..
推荐答案
使用JNI从Java代码访问本机DLL:
http://en.wikipedia.org/wiki/Java_Native_Interface [ ^ ],
http://docs.oracle.com/javase/7/docs/technotes/guides/jni/index.html [ ^ ]。
参见:
http:/ /electrofriends.com/articles/jni/jni-part1-java-native-interface [ ^ ],
http://www.ibm.com/developerworks/java/library/j-jni/index.html [ ^ ],
http://www.think -techie.com/2009/08/java-native-interface-jni.html [ ^ ]。
-SA
Accessing native DLLs from Java code is done using JNI:
http://en.wikipedia.org/wiki/Java_Native_Interface[^],
http://docs.oracle.com/javase/7/docs/technotes/guides/jni/index.html[^].
See also:
http://electrofriends.com/articles/jni/jni-part1-java-native-interface[^],
http://www.ibm.com/developerworks/java/library/j-jni/index.html[^],
http://www.think-techie.com/2009/08/java-native-interface-jni.html[^].
—SA
用Java加载DLL:
Load DLL in Java:
static {
System.loadLibrary("hellojni");
}
您还可以阅读文章 - 在Android,Windows和Mac上使用JNI入门 [ ^ ]
这篇关于如何在java applet中调用外部dll。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文