Reputation: 418
Im am trying to use a JNI library but unable to locate where the .so files are on my ubuntu machine?
The reason I need to find it is because I suspect Im using an older version and like to replace it with a newer one.
Its more of an ubuntu question rather than jni.
Any help is appreciated.
Upvotes: 0
Views: 3153
Reputation: 3585
The answer will differ depending on which library you are looking for.
You will find some in /lib
others in /usr/lib
depending on what you have installed you may also find .so's in /usr/local/lib
and possibly anywhere else in the system (see Duck's answer above for a way to find them all).
For a specific library you have installed from a package, for instance the JNI .so installed by the sun-java6-bin package you use dpkg to query for the package listing and look for where the files are you want.
dpkg -L sun-java6-bin | grep '\.so'
Which will indicate that most of this package is installed under /usr/lib/jvm/java-6-sun-*.
If you aren't sure which package your java was installed with you can search the list of installed packages with:
dpkg -l | grep java
I hope this helps.
Upvotes: 1
Reputation: 27542
find / -name "mylib.so" 2>/dev/null
If the filename is a symbolic link, follow the link to the actual lib.
Upvotes: 1