How to verify a library is already loaded?
807569May 30 2006 — edited May 31 2006I am using the following code to load a specific library
Runtime.getRunTime().load("/opt/TimesTen/tt60/lib/libtten.so");
I have a code that invokes the above line multiple times. Whats happening is that first time its loading properly wihtout any errors. And after that every time i will get an "UnsatisfiedLinkError----java.lang.UnsatisfiedLinkError: Native Library /opt/TimesTen/tt60/lib/libtten.so already loaded in another classloader", which make sense as i am trying to load the same library again without verifying.
I was wondering is there any way to check the library is already loaded before i can call the load function?
Thanks