Hi,

1. As far as I know you cannot
2. Maybe GlueGen can help you (NativeLibrary)

JP

-----Message d'origine-----
De : Frizz [mailto:[email protected]] 
Envoyé : mardi 18 mars 2014 06:35
À : [email protected]
Objet : JNI: unloading a DLL from the container

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?


cheers,
Frizz

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to