java - Given a class file, how to detect it uses JNI or not? -


i have java benchmarks class files.

i find benchmarks have jni calls.

i thought maybe can done bytecode level of javap -c, not sure.

any ideas?

if you're allowed load class, can use reflection:

class<?> clazz = ... list<method> nativemethods = new arraylist<>(); (method m : clazz.getdelcaredmethods()) {     if(modifier.isnative(m.getmodifiers())) {         nativemethods.add(m);     } } 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -