Skip to Main Content

Java HotSpot Virtual Machine

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!

Unsatisfied Link Error caused by attempting to load DLL twice

843829Mar 31 2009 — edited Apr 6 2009
Hi,

Hopefully someone can help me out with this issue.

My current situation is that I have an application which loads a Delphi based DLL when it loads. This application is in turn loaded from a seperate Java Application using reflection. The first time the application is opened it loads the DLL and works fine, however if I close the application and then re-open it i.e. create a new instance of the application, it crashes with

java.lang.UnsatisfiedLinkError: Native Library <filepath>\DataReader.dll already loaded in another classloader

I'm really not sure how to resolve this, I understand DLL's remain loaded until the VM terminates, but if I close the application and re-open it then I can't access the loaded version, or even test if it has been loaded. If anyone has any ideas about possible solutions, or where I should start looking for them I would apreciate it.

Many thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 4 2009
Added on Mar 31 2009
4 comments
169 views