jna
来源:互联网 发布:南风知我意 吹梦到西洲 编辑:程序博客网 时间:2024/05/19 15:20
package help1;
import com.sun.jna.Library;
import com.sun.jna.Native;
import com.sun.jna.Platform;
public class test1 {
public interface CLibrary extends Library{
CLibrary INSTANCE = (CLibrary)
Native.loadLibrary((Platform.isWindows() ? "msvcrt" : "c"),
CLibrary.class);
void printf(String a,String s);
}
public static void main(String[] args) {
// TODO Auto-generated method stub
CLibrary.INSTANCE.printf("Hello,Word\n","abc");
CLibrary.INSTANCE.printf("Hello,Word\n","der");
}
import com.sun.jna.Library;
import com.sun.jna.Native;
import com.sun.jna.Platform;
public class test1 {
public interface CLibrary extends Library{
CLibrary INSTANCE = (CLibrary)
Native.loadLibrary((Platform.isWindows() ? "msvcrt" : "c"),
CLibrary.class);
void printf(String a,String s);
}
public static void main(String[] args) {
// TODO Auto-generated method stub
CLibrary.INSTANCE.printf("Hello,Word\n","abc");
CLibrary.INSTANCE.printf("Hello,Word\n","der");
}
}
我的控制台打印的是两个换行的Hello, World,为什么我的abc和der没有被打印出来?
阅读全文
0 0
- JNA
- JNA
- jna
- JNA
- JNA
- JNA
- Jna
- jna
- JAVA JNA
- JNA介绍
- 初学JNA
- 关于JNA
- Java JNA
- Android JNA
- JNA介绍
- jna实战
- 开源项目JNA
- How does JNA work?
- 计算机网络技术基础
- 五款最佳VMware vSphere免费管理工具
- ClassLoader 简单总结
- CPU-上下文切换,运行队列和使用率
- OpenVirteX体系结构
- jna
- win7下mysql(10038)问题解决方法
- [搞笑动图]编译错误,括号不匹配
- linux centOS 安装apache+php+mysql及安装discuz
- Espresso检测不到Intent,Recorded intents:[]
- 导入新的maven项目时,目录结构变化,而且build path显示不正常。
- 各种开关的教程---凯利讯半导体
- 译文 | 与TensorFlow的第一次接触 第三章:聚类
- Eureka 源码解析 —— 应用实例注册发现(一)之注册