请问高手:在Java中如何调用DLL,我现在只知道DLL的头文件(.h)。请问我在java中如何去实现DLL的方法。我是这样写的:
public class testdll
{
static
{
System.loadLibrary("testdll");//加载dll
}
public native String TcpExit(); public static void main(String[] args)
{
………………
}
}
结果说的是 没有 找到 TcpExit的 方法
请问 我该 怎么 办? 谢谢~~
public class testdll
{
static
{
System.loadLibrary("testdll");//加载dll
}
public native String TcpExit(); public static void main(String[] args)
{
………………
}
}
结果说的是 没有 找到 TcpExit的 方法
请问 我该 怎么 办? 谢谢~~
Using the Java Native Interface with Delphi
http://www.pacifier.com/~mmead/jni/delphi/Integrate Java and C++ with Jace
http://www.javaworld.com/javaworld/jw-05-2002/jw-0510-integrate.htmlJNI : Java Glossary
http://mindprod.com/jgloss/jni.html
http://bbs.hacker.cn/archiver/?tid-4393.html
{
static
{
System.loadLibrary("testdll");//加载dll
}
public native String TcpExit(); public static void main(String[] args)
{
………………
}
}
/////////////////////////////
1.首先你的C/C++代码也就是本地代码没有书写
2.然后编译你的C/C++代码,把生成testdll.dll放到系统类路径里面就可以了