or
Sign in to turn on 1-Click ordering.
or
Amazon Prime Free Trial required. Sign up when you check out. Learn More
More Buying Choices
Have one to sell? Sell yours here
Java™ Native Interface: Programmer's Guide and Specification
 
See larger image
 
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Java™ Native Interface: Programmer's Guide and Specification [Paperback]

Sheng Liang (Author)
3.7 out of 5 stars  See all reviews (15 customer reviews)

List Price: $44.99
Price: $33.04 & this item ships for FREE with Super Saver Shipping. Details
You Save: $11.95 (27%)
  Special Offers Available
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.
Only 8 left in stock--order soon (more on the way).
Want it delivered Monday, January 30? Choose One-Day Shipping at checkout. Details
Textbook Student FREE Two-Day Shipping for Students. Learn more


Book Description

0201325772 978-0201325775 June 20, 1999 1
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

Special Offers and Product Promotions

  • Buy $50 in qualifying physical textbooks, get $5 in Amazon MP3 Credit. Here's how (restrictions apply)

Frequently Bought Together

Customers buy this book with Effective Java (2nd Edition) $39.18

Java™ Native Interface: Programmer's Guide and Specification + Effective Java (2nd Edition)
  • This item: Java™ Native Interface: Programmer's Guide and Specification

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Effective Java (2nd Edition)

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details



Editorial Reviews

Amazon.com Review

Written for the experienced Java developer, The Java Native Interface documents the latest in native code programming for the Java platform using the Java Native Interface (JNI) with C/C++. Author Sheng Liang built the book around "dos and don'ts," even specifying within the introduction when you should and when you should not use JNI. Though sometimes densely written, this title certainly conveys a good deal of technical information on using native code with Java.

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

From the Back Cover

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

Product Details

  • Paperback: 320 pages
  • Publisher: Prentice Hall; 1 edition (June 20, 1999)
  • Language: English
  • ISBN-10: 0201325772
  • ISBN-13: 978-0201325775
  • Product Dimensions: 9.2 x 7.3 x 0.8 inches
  • Shipping Weight: 1.4 pounds (View shipping rates and policies)
  • Average Customer Review: 3.7 out of 5 stars  See all reviews (15 customer reviews)
  • Amazon Best Sellers Rank: #621,846 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

 

Customer Reviews

15 Reviews
5 star:
 (5)
4 star:
 (5)
3 star:
 (1)
2 star:
 (3)
1 star:
 (1)
 
 
 
 
 
Average Customer Review
3.7 out of 5 stars (15 customer reviews)
 
 
 
 
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, April 1, 2002
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.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


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., April 25, 2003
This review is from: Java™ Native Interface: Programmer's Guide and Specification (Paperback)
The reason I write this comment is that I was suprised
that 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]

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


11 of 11 people found the following review helpful:
5.0 out of 5 stars A must for JNI users, June 11, 1999
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.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews











Only search this product's reviews



What Other Items Do Customers Buy After Viewing This Item?


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(3)

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
Search all Amazon discussions
   
Related forums



So You'd Like to...



Look for Similar Items by Category


Look for Similar Items by Subject