没有合适的资源?快使用搜索试试~ 我知道了~
首页Java Native Interface 6.0 Specification (JNI) 原创PDF书签
JNI调用的参考文档, 做java本地调用的时候必备的参考手册 最新官方文档整理成 PDF 版 + 书签 (http://download.oracle.com/javase/6/docs/technotes/guides/jni/spec/jniTOC.html)
资源详情
资源评论
资源推荐
Java Native Interface Specification—Contents
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
Compiling, 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
Modified UTF-8 Strings
4. JNI Functions
Interface Function Table
Version Information
Search
Oracle Technology Network Software Downloads Documentation
GetVersion
Class Operations
DefineClass
FindClass
GetSuperclass
IsAssignableFrom
Exceptions
Throw
ThrowNew
ExceptionOccurred
ExceptionDescribe
ExceptionClear
FatalError
ExceptionCheck
Global and Local References
NewGlobalRef
DeleteGlobalRef
DeleteLocalRef
EnsureLocalCapacity
PushLocalFrame
PopLocalFrame
NewLocalRef
Weak Global References
NewWeakGlobalRef
DeleteWeakGlobalRef
Object Operations
AllocObject
NewObject, NewObjectA, and NewObjectV
GetObjectClass
GetObjectRefType
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, and Call<type>MethodV Routines
CallNonvirtual<type>Method Routines, CallNonvirtual<type>MethodA Routines, and 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, and CallStatic<type>MethodV Routines
String Operations
NewString
GetStringLength
GetStringChars
ReleaseStringChars
NewStringUTF
GetStringUTFLength
GetStringUTFChars
ReleaseStringUTFChars
GetStringRegion
GetStringUTFRegion
GetStringCritical
Release StringCritical
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
GetPrimitiveArrayCritical
ReleasePrimitiveArrayCritical
Registering Native Methods
RegisterNatives
UnregisterNatives
Monitor Operations
MonitorEnter
MonitorExit
NIO Support
NewDirectByteBuffer
GetDirectBufferAddress
GetDirectBufferCapacity
Reflection Support
FromReflectedMethod
FromReflectedField
ToReflectedMethod
ToReflectedField
Java VM Interface
GetJavaVM
5. The Invocation API
Overview
Creating the VM
Attaching to the VM
Unloading the VM
Library and Version Management
JNI_OnLoad
JNI_OnUnload
Invocation API Functions
JNI_GetDefaultJavaVMInitArgs
JNI_GetCreatedJavaVMs
JNI_CreateJavaVM
DestroyJavaVM
AttachCurrentThread
AttachCurrentThreadAsDaemon
DetachCurrentThread
GetEnv
Contents | Previous |
Next
Copyright © 1993, 2013, Oracle and/or its affiliates. All rights reserved. Contact Us
Contents
Introduction
Chapter
1
This chapter introduces the Java Native Interface (JNI). The JNI is a native programming interface. It allows Java code that runs inside a Java
Virtual Machine (VM) to interoperate with applications and libraries written in other programming languages, such as C, C++, and assembly.
The most important benefit of the JNI is that it imposes no restrictions on the implementation of the underlying Java VM. Therefore, Java VM
vendors can add support for the JNI without affecting other parts of the VM. Programmers can write one version of a native application or library
and expect it to work with all Java VMs supporting the JNI.
This chapter covers the following topics:
Java Native Interface Overview
Background
Objectives
Java Native Interface Approach
Programming to the JNI
Changes
Java Native Interface Overview
While you can write applications entirely in Java, there are situations where Java alone does not meet the needs of your application.
Programmers use the JNI to write Java native methods to handle those situations when an application cannot be written entirely in Java.
The following examples illustrate when you need to use Java native methods:
The standard Java class library does not support the platform-dependent features needed by the application.
You already have a library written in another language, and wish to make it accessible to Java code through the JNI.
You want to implement a small portion of time-critical code in a lower-level language such as assembly.
By programming through the JNI, you can use native methods to:
Create, inspect, and update Java objects (including arrays and strings).
Call Java methods.
Catch and throw exceptions.
Load classes and obtain class information.
Perform runtime type checking.
Search
Oracle Technology Network Software Downloads Documentation
剩余68页未读,继续阅读
tester2
- 粉丝: 0
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- RTL8188FU-Linux-v5.7.4.2-36687.20200602.tar(20765).gz
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
- SPC统计方法基础知识.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论11