How to unload library (DLL) from the JVM

Alon Aizenberg picture Alon Aizenberg · Jan 17, 2009 · Viewed 32.9k times · Source

I need to unload a DLL that was loaded with System.loadLibrary(..), anyone know if this is possible?

Answer

Jon Skeet picture Jon Skeet · Jan 17, 2009

I don't have any experience of this, but a bit of digging shows that the library should be unloaded when the classloader which loaded the library is garbage collected.

Links: