[sword-devel] Java JNI bindings

Paul Gear sword-devel@crosswire.org
Mon, 08 Jan 2001 18:31:19 +1000


Joe Walker wrote:
> 
> Hi,
> 
> Not sure I've seen an answer to this, and Troy may have a totally different
> answer, but to me JNI is sometimes useful if the native interface you need is
> very simple, and the functionallity it provides is complex, and no Java
> alternative exists.
> 
> Often the complexities of debugging JNI make for a total nightmare time, and the
> interface code is not intuative at all. I've been programming in Java for
> several years and without doubt JNI is my worst experience. Websphere tries
> hard, but JNI takes he crown for horribility.
>
> I have some Java code to read sword data files if you are interested.

I know that it's not pretty, but i think that its the best way to ensure
compatibility with the C++ libraries and take advantage of new features
like compression, so i'd rather bind to the real API than use a rewrite
if i can.

Paul
---------
"He must become greater; i must become less." - John 3:30
http://www.bigfoot.com/~paulgear