Unsatisfied Link Error caused by attempting to load DLL twice
843829Mar 31 2009 — edited Apr 6 2009Hi,
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