How do I get a list of JNI libraries which are loaded?

前端 未结 7 1960
半阙折子戏
半阙折子戏 2020-11-28 07:54

Just what the subject says, is there a way in Java to get a list of all the JNI native libraries which have been loaded at any given time?

7条回答
  •  失恋的感觉
    2020-11-28 08:08

    In Clojure, copy/pastable at the REPL:

    (-> (doto (.getDeclaredField ClassLoader "loadedLibraryNames")
          (.setAccessible true))
        (.get (ClassLoader/getSystemClassLoader)))
    

提交回复
热议问题