Sheng Liang, a staff engineer in Java Software at Sun Microsystems, Inc., designed the JNI and led the Java virtual machine development for the first release of the Java 2 platform. He holds a Ph.D. in computer science from Yale University.
0201325772AB04062001
The Java Native Interface (JNI) enables the integration of code written in the Java programming language with code written in other languages such as C and C++. It allows programmers to take full advantage of the
more >>
Sheng Liang, a staff engineer in Java Software at Sun Microsystems, Inc., designed the JNI and led the Java virtual machine development for the first release of the Java 2 platform. He holds a Ph.D. in computer science from Yale University.
0201325772AB04062001
The Java Native Interface (JNI) enables the integration of code written in the Java programming language with code written in other languages such as C and C++. It allows programmers to take full advantage of the Java platform without having to abandon their investment in legacy code.
This book is the definitive resource and a comprehensive guide to working with the JNI. Entirely up-to-date, the book offers a tutorial, a detailed description of JNI features and programming techniques, JNI design justifications, and the official specification for all JNI types and functions.
You will find coverage of important topics such as:
- Writing native methods
- Passing data types between the Java language and native programming languages
- Embedding a Java virtual machine implementation in native applications
- Leveraging legacy native libraries
- Improving the efficiency and reliability of your code
An entire chapter is devoted to avoiding common traps and pitfalls. The book uses numerous examples to illustrate programming techniques that have proven to be effective.
0201325772B04062001
This book covers the Java(TM) Native Interface (JNI). It will be useful to you if you are interested in any of the following:
- integrating a Java application with legacy code written in languages such as C or C++
- incorporating a Java virtual machine implementation into an existing application written in languages such as C or C++
- implementing a Java virtual machine
- understanding the technical issues in language interoperability, in particular how to handle features such as garbage collection and multithreading
First and foremost, the book is written for developers. You will find easy steps to get started with the JNI, informative discussions on various JNI features, and helpful tips on how to use the JNI effectively. The JNI was initially released in early 1997. The book summarizes two years of collective experience gained by engineers at Sun Microsystems as well as the vast number of developers in the Java technology community.
Second, the book presents the design rationale of various JNI features. Not only is this of interest to the academic community, but a thorough understanding of the design is also a prerequisite to using the JNI effectively.
Third, a part of the book is the definitive JNI specification for the Java 2 platform. JNI programmers may use the specification as a reference manual. Java virtual machine implementors must follow the specification to achieve conformance.
Send comments on this specification or questions about JNI to our electronic mail address:jni@java.sun.com. For the latest on the Java 2 platform, or to get the latest Java 2 SDK release, visit our web site athttp://java.sun.com. For updated information about The Java(TM)Series, including errata for this book, and previews of forthcoming books, visitjava.sun.com/Series.
The JNI was designed following a series of discussions between Sun Microsystems and Java technology licensees. The JNI partly evolved from Netscape's Java Runtime Interface (JRI), which was designed by Warren Harris. Many people from Java technology licensee companies actively participated in the design discussions. They include Russ Arun (Microsoft), Patrick Beard (Apple), Simon Nash (IBM), Ken Root (Intel), Ian Ellison-Taylor (Microsoft), and Mike Toutonghi (Microsoft).
The JNI design also benefited greatly from Sun internal design reviews conducted by Dave Bowen, James Gosling, Peter Kessler, Tim Lindho
<< less