Is there any way to call the functions which are in a so
library from my Java code? Generally, is it possible to use Linux so
libraries in Java pr
The answer is "JNI" :)
Here are a couple of links:
How to compile dynamic library for a JNI application on linux?
http://learn-from-the-guru.blogspot.com/2007/12/java-native-interface-jni-tutorial-hell.html
http://docs.oracle.com/javase/6/docs/technotes/guides/jni/
Another wayto access libraries form java besides JNI is JNA.
I find that in many cases it's easier to use then JNI, but that's just my personal opinion.
You cannot use arbitrary .so
libraries in your Java code. You can use JNI to write a wrapper around native code to access from Java.
However, be aware that doing so negates many of the advantages of using Java. Your code and deployment system now becomes quite fragile and subject to many types of bugs that cannot happen in Java. I would try quite hard to find a pure-Java solution before resorting to using native code.