Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to verify a library is already loaded?

807569May 30 2006 — edited May 31 2006
I 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 28 2006
Added on May 30 2006
10 comments
1,713 views