Thread: Help with JNI
View Single Post
  #2 (permalink)  
Old 07-02-2007, 05:41 PM
Eric Eric is offline
Senior Member
 
Join Date: Jun 2007
Posts: 111
Eric is on a distinguished road
Ok, well then - JNI is the Java Native Interface. It is a means of using a native (that is, O/S and platform specific) library from within Java. Java and the native library can send data structures back and forth and call methods back and forth. It is most commonly used with C and C++ programs though that is not a requirement.

By definition the use of JNI mean that your code is no longer portable as it isn't 100% Java. You would have to distribute platform specific binaries with your Java just as you would if you coded in C.

A common use is for vendors who don't really want to write in Java and have an already existing native code library. They provide a thin JNI wrapper over the native library and poof - they have Java support.

Greetings.

Eric
Reply With Quote