After a simple JNI "Hello World" code example, this book explores multiple aspects of the JNI API, starting with the use of Java strings and arrays within native code. Liang follows by transitioning into calling Java members and methods in C/C++. Here the author presents caching strategies for improving the performance of native code that interacts with or executes Java programs, including a discussion of local and global references that incorporates global weak references in Java 2.
The book also looks at handling exceptions within C/C++ code, as well as tips for working with Java threads. The author shows how to simplify access to C/C++ code through shared stubs and how to use peer classes to encapsulate native code from within Java. A section on common traps and pitfalls lists some common pitfalls to avoid when working with the JNI. After presenting the JNI specification, the author provides the most immediately useful text in the book--over 100 pages of reference material listing JNI data types and methods.
As a reference and programming guide, The Java Native Interface provides concise and timely technical details on getting Java and C/C++ code to coexist within your projects. --Richard Dragan
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:
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.
Product Details
Would you like to update product info or give feedback on images?
|
|
Share your thoughts with other customers:
|
||||||||||||||||||||||
|
Most Helpful Customer Reviews
30 of 31 people found the following review helpful:
4.0 out of 5 stars
Dont Buy this Book It is Freely Available on the Java Site,
By Vamsi P. (Redmond, WA USA) - See all my reviews
This review is from: Java™ Native Interface: Programmer's Guide and Specification (Paperback)
This is book is very handy if you are programming for JNI. I went and bought this book but later found that is free on the Sun's Java site.... So buy it only if you need a paper copy. If you are ok with a PDF or html copy goto sun's website to get it.
16 of 17 people found the following review helpful:
4.0 out of 5 stars
Good book but do not buy it. It is available FREE from SUN.,
This review is from: Java™ Native Interface: Programmer's Guide and Specification (Paperback)
The reason I write this comment is that I was suprisedthat this book is available in electronic form, free of charge from Sun website. As far as I read the book, it is quite good but I did not test anything. I probably will in my summer project and I will inform you if what the Native Interface promised , did finally work. Anyway the Sun website for the book is : [website]
11 of 11 people found the following review helpful:
5.0 out of 5 stars
A must for JNI users,
By
This review is from: Java™ Native Interface: Programmer's Guide and Specification (Paperback)
This is an excellent book! Liang provides short, illustrative, and useful examples as well as helpful tips for the JNI user. The presentation is extremely clear, with no fluff. This book is more informative than any existing material on JNI I know of. It offers a gentle introduction for the novice as well as technical depth for the expert. I particularly like the level of insight that only the designer and architect of the JNI can provide. My favorite programming technique is "shared stubs," beats J/Direct.
Share your thoughts with other customers: Create your own review
|
|
Tags Customers Associate with This Product(What's this?)Click on a tag to find related items, discussions, and people.
|
|
This product's forum
Active discussions in related forums
Search Customer Discussions
|
Related forums
|