Java Native Interface (JNI) - bundling a native library with my jar file

My application consists of a bunch of java classes (in a jar file) plus a large native library.

How do I bundle these together and make it easy for the user to deploy and to

set up the java.library.path to include this library location.

I would like to put the native library into the jar file and have System.loadLibrary()

automatically find it, but don't know how to do this.

Thanks,

Andy

[434 byte] By [p7ea] at [2007-11-26 23:27:23]
# 1
You can't.If you put it in the jar, then before using it, your program will have to extract it.
bschauwejavaa at 2007-7-10 14:36:08 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2
Hi,It seems that SWT team bundles the SWT lib like that.You may have a look at it to see how it works.--Marc ( http://jnative.sf.net)
mdentya at 2007-7-10 14:36:08 > top of Java-index,Java HotSpot Virtual Machine,Specifications...