felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frizz <frizzthe...@googlemail.com>
Subject JNI: unloading a DLL from the container
Date Tue, 18 Mar 2014 05:35:00 GMT
Hi there,

I have a bundle where I load a DLL with System.load(dllFileName).

Once I redeploy the bundle I get an exception:
java.lang.UnsatisfiedLinkError: Native Library c:\demo\libs\myLib.dll
already loaded in another classloader

I assume this happens because DLLs are only loaded once for the JVM. So
when the bundle is redeployed, the DLL is accessed from a different class
loader and an exception is thrown.

Two questions:

(1) How can I unload a DLL from a container?

(2) Simply putting the DLL in the container lib/ext or lib/native folder
(to be loaded at runtime) is no solution for me, because I'm still in the
development phase of the DLL - so the code changes quite frequently. So I
need a way to REDEPLOY my bundle (I usually do a dev:watch during
development). Any suggestions?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message