Contents Previous Next

Chapter   3

KNI Scope


KNI is designed to be a logical subset of the Java Native Interface (JNI). The scope of KNI compared to JNI is presented in TABLE 1 below. For a summary of the JNI Scope, refer to the Java Native Interface Programmer’s Guide and Specification, pages 175–179.

TABLE 1  –  JNI vs. KNI Scope
JNI Function Categories
Supported by KNI (YES/NO)
Version Information
YES
Class and Interface Operations
YES
Exceptions
YES
Global and Local References
NO
Object Operations
YES
Instance Field Access
YES
Static Field Access
YES
Instance Method Calls
NO
Static Method Calls
NO
String Operations
YES
Array Operations
YES
Native Method Registration
NO
Monitor Operations
NO
JavaVM Interface
NO
Reflection Support
NO

In addition, KNI introduces a set of new operations for method parameter (operand stack) access, and for manipulating handles to objects. These operations are KNI-specific and not available in the JNI.

Each of the supported function categories is introduced in more detail below. Note that the naming of these functions is different from JNI. Each function supported by the KNI uses a prefix “KNI_” in front of the function name.

3.1 Version Information

KNI_GetVersion function returns the version of the KNI interface.

3.2 Class and Interface Operations

3.3 Exceptions

3.4 Object Operations

3.5 Instance Field Access

3.6 Static Field Access

3.7 String Operations

3.8 Array Operations

3.9 Parameter (Operand Stack) Access

3.10 Handle Operations

 


Contents Previous Next KNI Specification
K Native Interface (KNI), 1.0