Alex Rivera | Logout

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

Asked 2009-06-17T15:39:06.700
25

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?

Edit
Report

1 Answer

2

Since Nicolas mentioned Scala, here is one way to do jitter's solution via JRuby (tested in 1.6 and 1.7):

require 'java'
import 'java.lang.ClassLoader'
f = ClassLoader.java_class.declared_field('loadedLibraryNames')
f.accessible = true
f.value(ClassLoader.system_class_loader).to_array.to_a
answered 2013-01-30T16:08:53.250

Your Answer