用javah来生成头文件,java和其它都能调用的。
解决方案 »
- 几个方法求优化
- JAVA聊天室问题紧急求助
- 一个让我摸不着头的程序。 java.lang.NoSuchMethodError: main
- 一个valueOf()的问题。
- 在SWT中,类似于VC MVC中document的传递怎么实现?
- 关于java的runtime.exec
- 我刚开始学习JAVA,请教几本JAVA的好书,及网站!!!!!!!!!
- 有没有有索引的JDK帮助啊
- 上传文件时,如何在读取文件内容之前中断读取,并返回客户端错误信息?
- Java怎么调用存储过程?给个例子吧?
- 请求getResourceAsStream()方法的使用????
- FileInputStream 怎么转换成 ServletOutputStream ?
能具体点吗?
我在java中,选中我的.java文件,但是我将该.java文件编译成.h文件后,在我工程里却找不到,搜索了一下也没有找到,这是什么原因啊???
2.in the class, write the same name native method according to the DLL;
3.call System.loadLibrary("") to load the dll;
for example:
public class xxxx
{
static public native long Getxxx(...);
static public native boolean Init(...);
//...
static{
try{
System.loadLibrary("...");//string is dll name(exclude ".dll");
}
catch(java.lang.UnsatisfiedLinkError e)
{
System.out.println(e.getLocalizedMessage() );
}
}}
call method:
boolean bInit = xxxx.Init(...);