如何从JVM卸载库(DLL) [英] How to unload library (DLL) from the JVM

查看:82
本文介绍了如何从JVM卸载库(DLL)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要卸载用System.loadLibrary(..)加载的DLL,有人知道这是否可能吗?

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

推荐答案

我对此没有任何经验,但是一点点挖掘表明,当垃圾回收器加载了加载库的类加载器时,应该卸载该库.

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.

链接:

  • Invocation API docs (Sun) - look for "Library and Version Management"
  • Java JNI DLL Unloading tutorial

这篇关于如何从JVM卸载库(DLL)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆