| ★ wanayoo — archive 1999 http://java.sun.com/javaone/javaone97/java1-97-jni.html | Nouvelle recherche | Portail wanayoo |
|
JavaTM Native Interface Added to JDKTM 1.1JNI provides an interface between Java code and native code; Netscape offers its comprehensive Java Runtime Interface and plans to support JNI
|
|
|||
|
By Phil Inje Chang, JavaWorldTM San Francisco (April 4, 1997) -- JavaTM Native Interface, or JNI, provides a consistent interface between Java code and native (platform-specific) code. Toward the end of the first day of JavaOneSM, Sheng Liang, of JavaSoftTM, spoke on this interface as part of the Advanced Programming Tutorial. JNI, new in Java Development Kit (JDKTM) 1.1, takes the place of the Native Method Interface in JDK 1.0. Netscape offers the Java Runtime Interface, or JRI, as a comprehensive environment for Netscape's Java virtual machine* (JVM). The Microsoft JVM supports the low-level Raw Native Interface, or RNI, and the higher-level Java/COM interface. The primary goal of JNI is to provide binary compatibility of native method libraries across all JVM implementations on a given platform. This allows developers to maintain a single version of their native method libraries on that platform. JNI has two main uses: It specifies a way to write Java native methods, and it includes an Invocation API for embedding a JVM in native applications. The JNI standard may give a native library its "best chance" to run in a given JVM, according to JavaSoft. In addition, JDK 1.1 still supports the older Native Method Interface in JDK 1.0, but future versions of the JDK may not.
While all of the existing native interfaces may have their various
strengths and weaknesses, Netscape's JRI was used as a starting point
for JNI. Netscape plans to support JNI, according to sources at
Netscape, and it may appear in Communicator pre-release 4.
Resources
*As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform. |
|||||