Contents | Prev | Next

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
History of Changes
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 Scalar Arrays
Accessing Fields and Methods
Reporting Errors
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
IsSubclassOf
Exceptions
Throw
ThrowNew
ExceptionOccurred
ExceptionDescribe
ExceptionClear
FatalError
Global and Local References
NewGlobalRef
DeleteGlobalRef
DeleteLocalRef
Object Operations
AllocObject
NewObject
NewObjectA
NewObjectV
GetObjectClass
IsInstanceOf
IsSameObject
Accessing Fields of Objects
GetFieldID
GetField
SetField
Calling Instance Methods
GetMethodID
CallMethod
CallMethodA
CallMethodV
CallNonvirtualMethod
CallNonvirtualMethodA
CallNonvirtualMethodV
Accessing Static Fields
GetStaticFieldID
GetStaticField
SetStaticField
Calling Static Methods
GetStaticMethodID
CallStaticMethod
CallStaticMethodA
CallStaticMethodV
String Operations
NewString
GetStringLength
GetStringChars
ReleaseStringChars
NewStringUTF
GetStringUTFLength
GetStringUTFChars
ReleaseStringUTFChars
Array Operations
GetArrayLength
NewObjectArray
GetObjectArrayElement
SetObjectArrayElement
NewScalarArray
GetScalarArrayElements
ReleaseScalarArrayElements
GetScalarArrayRegion
SetScalarArrayRegion
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

Contents | Prev | Next

Java Native Method Interface Specification (HTML generated by wegis on December 06, 1996)
Copyright © 1996 Sun Microsystems, Inc. All rights reserved
Please send any comments or corrections to sl@eng.sun.com