JNI coding is usually a manual process for writing C ++ code to create custom glue methods. There is a whole book that explains this.
In some cases, http://jna.java.net/ can automate or speed up this process, but not count on it.
You cannot โlink native librariesโ unless you follow the path of using OSGi or something like the Tanukisoft packaging tool; there is no built-in function in Java for this purpose.
You connect the dots with -Djava.library.path to tell java where to look for your own libraries, or use the lower-level APIs in System.loadLibrary that allow you to specify the full path.
Watch for interactions with PATH and LD_LIBRARY_PATH if your own libraries have dependencies in turn.
source share