Rating:  Summary: This is an excellent practical guide to JNI... Review: ...and I'd pay $40 (or whatever) for chapter 10 by itself. Wondering why getStringChars() returns a pointer to a char[] with some gibberish at the end? Check out section 10.8. Trying to figure out why you're getting strange warnings about too many local references? Read section 10.12.That's just a taste. Not only does Liang discuss caching method & field IDs, he spends about 10 pages at the end of chapter 4 detailing two strategies for doing it. Then he describes the performance differences btwn Java inter-object method calls, Java-native calls, and native-Java calls. What a gold mine. Yeah, there are some typos in the examples. Yeah, it's biased against native code - and why not, when it take 10 lines of tedious, error prone C to replace 1 line of Java? But if you are a JNI programmer, this has got to be on your desk.
Rating:  Summary: This is an excellent practical guide to JNI... Review: ...and I'd pay $40 (or whatever) for chapter 10 by itself. Wondering why getStringChars() returns a pointer to a char[] with some gibberish at the end? Check out section 10.8. Trying to figure out why you're getting strange warnings about too many local references? Read section 10.12. That's just a taste. Not only does Liang discuss caching method & field IDs, he spends about 10 pages at the end of chapter 4 detailing two strategies for doing it. Then he describes the performance differences btwn Java inter-object method calls, Java-native calls, and native-Java calls. What a gold mine. Yeah, there are some typos in the examples. Yeah, it's biased against native code - and why not, when it take 10 lines of tedious, error prone C to replace 1 line of Java? But if you are a JNI programmer, this has got to be on your desk.
Rating:  Summary: Good examples, concise approach Review: I had to integrate our company's distributed Java component-based application with a vendor's C/C++ - only libraries. My C++ skills had gotten pretty rusty and so I bought the Gordon JNI book and was really disappointed. I then bought this book and was much happier with its examples and approach than the Gordon book. While the other reviewers in this page cited that they thought the book was bad or the examples didn't compile, they may be justified, but since they have only to choose from this and the Gordon book on JNI, I think they will find this book is far clearer and more concise. What's more is that it's terse enough that you can get the whole book read during the course of a 3 week project. And as far as the author having a bias towards Java is concerned: Duh.
Rating:  Summary: Not enough examples. Review: I have a feeling Sun Micro had more to do with why there's not enough examples of how to do advanced features of JNI. Afterall, using JNI essentially breaks the philosophy of compile once, run everywhere. Some simple, so you think, things like moving a string array from Native-C to Java is not described at all. Nor is moving a float array from Native-C to Java. What this book does well is describe for the beginner how to get started with simple examples. Essentially to learn the core JNI concepts. But after that, trying to apply the more advanced JNI functions and classes, there's really no ample examples. You have to rely on the Newsgroups essentially. Forget about java.sun.com, they don't go that deep into it either. Good book but be aware of its limitations.
Rating:  Summary: Not enough examples. Review: I have a feeling Sun Micro had more to do with why there's not enough examples of how to do advanced features of JNI. Afterall, using JNI essentially breaks the philosophy of compile once, run everywhere. Some simple, so you think, things like moving a string array from Native-C to Java is not described at all. Nor is moving a float array from Native-C to Java. What this book does well is describe for the beginner how to get started with simple examples. Essentially to learn the core JNI concepts. But after that, trying to apply the more advanced JNI functions and classes, there's really no ample examples. You have to rely on the Newsgroups essentially. Forget about java.sun.com, they don't go that deep into it either. Good book but be aware of its limitations.
Rating:  Summary: I found this book to be *very* useful! Review: I just finished developing a video streaming CaptureDevice for the Java Media Framework. This involved tricky call backs and array/control manipulation between MS DirectShow and Java via the Java Native Interface. I gave the JNI a *very* through workout here! Sun's on-line documentation is an good quick reference, but it does not fill in the details. This book, however, was more than adequate to cover the bases. I don't know which examples a previous reviewer was refering to that were "full of bugs and almost never worked," since I found no problems with the examples I used. This book could have been organized better IMHO, but the author's explainations were clear and to the point--at least they were for me, anyway. This programmer's guide is a quick read and the author makes a good effort explaining a dry, but necessary, aspect of Java programming.
Rating:  Summary: The best so far Review: The problem with JNI is that there are no to many books. When you start using JNI it looks complex. After a while you realized is simple. This book help me to understand and use JNI. Now after a year of using it I decided to write this review. This book is the best out there for JNI. Sure it could have more examples and longer explanations. Every paragraph in this book is important. The author is very concise but cover the whole subject. In the back you get a reference to the JNI API. I look at the other books (2) and I am very happy I bought this book.
Rating:  Summary: Good book but do not buy it. It is available FREE from SUN. Review: 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]
Rating:  Summary: Good book to start using JNI Review: This is a book that can get you rapidly into the business of integrating Java and C. Sheng demonstrates the usage of JNI by some short and clear examples. He also provides detailed instructions to set up the environment variables on your computer. In my experience, following his introduction is a smooth way to get JNI working. There are in-depth descriptions of the JNI specification as well. I would like to recommend this book to every JNI user -- a book from the JNI designer is surely a good resource.
Rating:  Summary: A must for JNI users Review: 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.
|