Hello Frizz, That is exactly why OSGi has a built-in mechanism to load native code, to deal with such problems. You say you are loading the DLL yourself, but did you look at the specification and its abilities to load native code?
If for some reason you really can’t use the spec for this, I suggest you study the implementation of loading native code in the Felix framework (which shows you what tricks to play) but to be honest, I would not go there but leverage what is already present. Greetings, Marcel On 19 Mar 2014, at 4:32 , Frizz <[email protected]> wrote: > Hi all, > > I load a DLL using JNI. Because I'm still in development phase, I use > "dev:watch" to automatically update my bundle in the container. > > I understood that this results in an exception: "UnsatisfiedLinkError: > Native Library xyz already loaded in another classloader" - because the DLL > is already loaded by the JVM. > > I also understood that only after the classloader that loaded the DLL is > garbage collected, the DLL is unloaded. > > So I uninstalled the bundle - yet I still get the UnsatisfiedLinkError > exception. Which means the classloader is still alive. > > Shouldn't the bundles classloader be gone once I uninstalled the bundle? > > cheers, > Frizz --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

