I'm using a JAR file of my own, which uses a Java library (JHDF5), that in turn uses a dll through JNI. When I use my own JAR file in MATLAB, and then have to rebuild it while debugging, I get this error when I try to use it again, after calling clear java
and creating a new object from my JAR file:
java.lang.UnsatisfiedLinkError:
Native Library C:\deka\proj\java\ESPDF\dist\lib\jhdf5.dll
already loaded in another classloader
and I can't solve it without shutting down MATLAB and reopening, which is a pain in the neck.
What is this error and whose fault is it? (mine? MATLAB's? JHDF5 for not freeing the DLL or checking to see if it's already loaded)