package clibtest;
import com.sun.jna.Native;
public class hello {
public static void main(String[] args) {
// Loading dynamically the library
CLib lib = (CLib) Native.loadLibrary("libJNALib", CLib.class);
lib.init(new CLib.OpenFunc() {
public void invoke(String filename, int i) {
System.out.println("callback called.");
System.out.println(filename);
}
});
lib.test();
}
}
JNA实现Java调用C++动态链接库(3)
内容版权声明:除非注明,否则皆为本站原创文章。