This document, K Native Interface Specification, defines a new native function interface, called the K Native Interface (KNI), for the Java™ 2 Platform, Micro Edition (J2ME™). The K Native Interface is designed to improve the portability and compatibility of the native functions that are written for the K Virtual Machine (KVM), the CLDC HotSpot™ Implementation JVM, or other Java virtual machine implementations that support the J2ME Connected, Limited Device Configuration (CLDC) standard. KNI is designed as a logical subset of the Java Native Interface (JNI). However, KNI is significantly more lightweight and more efficient in small devices than a full JNI implementation.
The audience for this document includes:
Note that KNI is an implementation-level interface. A virtual machine conforming to the CLDC Specification or another J2ME configuration specification is not required to support the K Native Interface, but may do so at the implementation level.
The Java™ Language Specification (Java Series), Second Edition by James Gosling, Bill Joy, Guy Steele and Gilad Bracha. Addison-Wesley, 2000, ISBN 0-201-31008-2
The Java™ Virtual Machine Specification (Java Series), Second Edition by Tim Lindholm and Frank Yellin (Addison-Wesley, 1999)
Programming Wireless Devices with the Java™ 2 Platform, Micro Edition (Java Series) by Roger Riggs, Antero Taivalsaari, and Mark VandenBrink. Addison-Wesley, 2001, ISBN 0-201-74627-1.
The Java™ Native Interface: Programmer’s Guide and Specification (Java Series) by Sheng Liang. Addison-Wesley, 1999, ISBN 0-201-32577-2.
Connected, Limited Device Configuration Specification, version 1.0, Java Community Process, Sun Microsystems, Inc.
http://java.sun.com/aboutJava/communityprocess/final/jsr030/
Java 2 Platform Micro Edition (J2ME™) Technology for Creating Mobile Devices, A White Paper, Sun Microsystems, Inc.
http://java.sun.com/products/cldc/wp/KVMwp.pdf
September 7, 2001: The first 0.1 version based on an earlier draft prepared by Efren Serra.
September 30, 2001: Version 0.2 with significant changes to the goals and high-level structure of the document.
October 8, 2001: Version 0.3 with updated programming overview and significant changes to the data type and function chapters.
October 10, 2001: Version 0.4 prepared after detailed review meeting.
November 6, 2001: Version 0.9 with minor revisions to function descriptions. Removed KNI_GetStringChars
. Changed KNI_Throw
to KNI_ThrowNew
. Added a small sample program to illustrate string access.
January 3, 2002: Version 0.99 -- Small polishing, revised examples.
January 15, 2002: Version 1.0: Two additional functions, KNI_NewString and KNI_IsSameObject, added. Final polishing.
January 18, 2002: Version 1.0: Replaced the KNI_SetResultAs* functions with more portable KNI_Return* functions. Some changes to the handle operations as well.
February 11, 2002: Version 1.0: Minor clarifications to the description of the KNI_ThrowNew function. Updated the parameter types of KNI_Get/SetRawArrayRegion functions.
October 18, 2002: Version 1.0: Reformatted the KDWP Specification version 1.0 for Section 508 Accessibility. No changes in technical content of the specification.
December 5, 2002: Version 1.0: Corrected minor typos in Section 4.3.1.
December 16, 2002: Version 1.0: Documented restriction (no interface support) for function KNI_GetStaticFieldID in Section 5.6.1.
KNI Specification K Native Interface (KNI), 1.0 |
Copyright © 2002 Sun Microsystems, Inc. All rights reserved.