1. Put the library in the PATH:
mdt@belgarath: $ bsh
bsh % print(System.getProperty("java.library.path"));
/home/mdt/programmes/jre1.6.0_99/jre1.6.0/lib/i386/client: /home/mdt/programmes/jre1.6.0_99/jre1.6.0/lib/i386: /home/mdt/programmes/jre1.6.0_99/jre1.6.0/../lib/i386:/usr/java/packages/lib/i386: /lib:/usr/lib
C:\> echo %windir%
2. Use the VM option mechanism -Djnative.loadNative=value
3. Use the System properties
This works exactly the same way that previous chapter, but instead in your code you’ll have to add to the System properties the same entry, for example you want to use the lib from a known directory, but some times the lib can be elsewhere :
JNative can print some useful information when something goes wrong. The same way of loading native side you can use the System property jnative.debug to enable this feature.
To be continued...
With the hope JNative will help you. I do not earn any money for this product, so don’t ask it to be as good as commercial ones. In particular, I cannot be responsible of any damage done by direct or indirect (mis)use of JNative.
Share the knowledge : it grows !