Is there a way to judge if a class has been loaded into the jvm?

Is it possible to determine if a class is loaded in jvm? In my opinion, I think that's the way to go findClass

, right?

+3
java jvm jvm-hotspot


source to share


3 answers


Ok, so I didn't. But it looks like it will be possible in the Instrumentation APIgetAllLoadedClasses()

.



But then you still need to start the JVM with agent

.

+1


source to share


Enable classloader logging with -verbose:class

and read the log.



0


source to share


You can use jdk tool like JConsole.

0


source to share







All Articles
Loading...
X
Show
Funny
Dev
Pics