发文章
发文工具
撰写
网文摘手
文档
视频
思维导图
随笔
相册
原创同步助手
其他工具
图片转文字
文件清理
AI助手
留言交流
1. Introduction
Java Native Interface Overview
Background
JDK 1.0 Native Method Interface
Java Runtime Interface
Raw Native Interface and Java/COM Interface
Objectives
Java Native Interface Approach
Programming to the JNI
Changes in JDK 1.1.2
2. Design Overview
JNI Interface Functions and Pointers
Loading and Linking Native Methods
Resolving Native Method Names
Native Method Arguments
Referencing Java Objects
Global and Local References
Implementing Local References
Accessing Java Objects
Accessing Primitive Arrays
Accessing Fields and Methods
Reporting Programming Errors
Java Exceptions
Exceptions and Error Codes
Asynchronous Exceptions
Exception Handling
3. JNI Types and Data Structures
Primitive Types
Reference Types
Field and Method IDs
The Value Type
Type Signatures
UTF-8 Strings
4. JNI Functions
Interface Function Table
Version Information
GetVersion
Class Operations
DefineClass
FindClass
GetSuperclass
IsAssignableFrom
Exceptions
Throw
ThrowNew
ExceptionOccurred
ExceptionDescribe
ExceptionClear
FatalError
NewGlobalRef
DeleteGlobalRef
DeleteLocalRef
Object Operations
AllocObject
NewObject NewObjectA NewObjectV
GetObjectClass
IsInstanceOf
IsSameObject
Accessing Fields of Objects
GetFieldID
Get<type>Field Routines
Set<type>Field Routines
Calling Instance Methods
GetMethodID
Call<type>Method Routines Call<type>MethodA Routines Call<type>MethodV Routines
CallNonvirtual<type>Method Routines CallNonvirtual<type>MethodA Routines CallNonvirtual<type>MethodV Routines
Accessing Static Fields
GetStaticFieldID
GetStatic<type>Field Routines
SetStatic<type>Field Routines
Calling Static Methods
GetStaticMethodID
CallStatic<type>Method Routines CallStatic<type>MethodA Routines CallStatic<type>MethodV Routines
String Operations
NewString
GetStringLength
GetStringChars
ReleaseStringChars
NewStringUTF
GetStringUTFLength
GetStringUTFChars
ReleaseStringUTFChars
Array Operations
GetArrayLength
NewObjectArray
GetObjectArrayElement
SetObjectArrayElement
New<PrimitiveType>Array Routines
Get<PrimitiveType>ArrayElements Routines
Release<PrimitiveType>ArrayElements Routines
Get<PrimitiveType>ArrayRegion Routines
Set<PrimitiveType>ArrayRegion Routines
Registering Native Methods
RegisterNatives
UnregisterNatives
Monitor Operations
MonitorEnter
MonitorExit
Java VM Interface
GetJavaVM
5. The Invocation API
Overview
Creating the VM
Attaching to the VM
Unloading the VM
Initialization Structures
Invocation API Functions
JNI_GetDefaultJavaVMInitArgs
JNI_GetCreatedJavaVMs
JNI_CreateJavaVM
DestroyJavaVM
AttachCurrentThread
DetachCurrentThread
来自: 昵称11919999 > 《待分类1》
0条评论
发表
请遵守用户 评论公约
Java中的native关键字浅析(Java Native Interface)
Java中的native关键字浅析(Java Native Interface)JNI(Java Native Interface)的书写步骤。·编写带有native声明的方法的java类 ·使用javac命令编译所编写的java类 ·使用j...
JNI简介
JNI简介JNI是Java Native Interface的缩写,中文为JAVA本地调用。从Java1.1开始,Java Native Interface(JNI)标准成为java平台的一部分,它允许Java代码和其他语言写的代码进行交互。JNI(Java Native I...
JvmSpecification-RuntimeDataAreas(2)
每个Runtime Constant pool都是在jvm的method area中分配的,每个class或者interface的constant pool都是在jvm创建class或接口的时候创建的。若一个线程估算需要较大的native method stack,超出了允许...
Java Native Access (JNA)
JNA provides Java programs easy access to native shared libraries (DLLs on Windows) without writing anything but Java code—no JNI or native code is required. This functionality is compar...
java 本地接口(java native interface)
Java本地接口(JNI)是为java编写本地方法和jvm嵌入本地应用程序的标准的应用程序接口。下图解释了传统的C语言如何使用JNI连接java库,并调用java方法,使用java类等。下图是java应用程序调用本地方法,...
基于 Android NDK 的学习之旅-----序言
基于 Android NDK 的学习之旅-----序言。先详细介绍下NDK, JNI:The Android NDK is a toolset that lets you embed components that make use of native code in your Android applications.【Android...
关于JNI和NDK
北京|奔三 应该是jni记java跟c c++互通上海|Bood ndk有很多sample,研究一个简单点的就ok了上海|Bood 有个hello-jni上海|Bood 基本就明白是咋回事了呵呵心 ndk应该也提供了啥 编译工具吧北京|奔三 ...
The Invocation API(JNI)
If the native library does not export a JNI_OnLoadfunction, the VM assumes that the library only requires JNI versionJNI_VERSION_1_1.If ignoreUnrecognized isJNI_TRUE, JNI_CreateJavaVM ign...
关于Java中Native修饰符
关于Java中Native修饰符。1、一个native方法就是一个Java调用非Java代码的接口。JNI是Java本机接口(Java Native Interface),是一个本...
微信扫码,在手机上查看选中内容