![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JNI
窦哲
态度角度思考改变行动时间差
展开
-
1. JNI Design
来自:JNI Design1. JNI Interface Functions and PointersNative code 通过调用 JNI funtions 访问 Java VM features。通过 interface pointer 获取到JNI functions。Interface pointer 是一个pointer指向一个pointer,这个pointer指向一个pointer数翻译 2017-11-29 18:04:57 · 191 阅读 · 0 评论 -
2. JNI 类型和数据结构
来自:JNI Types And Data Structures1. Primitive TypesPrimitive Types and Native Equivalents: Java Type Native Type Description boolean jboolean unsigned 8 bits byte jbyte signed 8 bits翻译 2017-11-29 18:08:58 · 247 阅读 · 0 评论 -
3. JNI Functions - Interface Functions Table
来自:Interface Functions Table通过参数JNIEnv来访问每个方法。JNIEnv类型是一个指向存储所有JNI方法指针结构的指针 (The JNIEnv type is a pointer to a structure storing all JNI function pointers)。 定义:typedef const struct JNINativeInterface翻译 2017-11-29 18:10:39 · 310 阅读 · 0 评论 -
4. The Invocation API
来自:The Invocation API1. Overview举例说明如何使用Invocation API中的方法。下面使用C++代码创建一个Java VM,然后调用一个称为Main.test的static method。 Invocation API允许native application使用JNI interface pointer访问VM特性。Eg: #include <jni.h>翻译 2017-11-29 18:13:41 · 387 阅读 · 0 评论