how can we get the list of all the classes that are currently loaded in the Java Virtual Machine(JVM)?? it'd be better without the use of any external libraries..thank you.
cool_zephyr
7
Junior Poster in Training
Recommended Answers
Jump to PostWell, you can see all the classes as they load with the -verbose:class option when you start the jvm. You can pipe that output to a file. After they are loaded, the application should run normally.
Jump to Posthow can we get the list of all the classes that are currently loaded
...
no I want to get a hold of the instance of the classSo is it version 1 or version 2? And if it's 2, how would you define "the instance of the …
Jump to PostBy "multiple instances" I mean something like:
Object a = new Thing(); // a is an instance of Thing Object b = new Other(); // b is an instance of Other Object c = new Other(); // c is an instance of Other
The JVM now …
Jump to PostOK. That's perfectly clear now, thanks.
I don't know of any API that does that, but the visualvm profiling tool that comes with the JDK does have tools to get a list of all the objects in the heap (eg see http://visualvm.java.net/heapdump.html …
Jump to Postmore thoughts...
if the target starts at boot time then it will be running in its own VM with its own heap/stack. Any other Java program you start later will also have its own VM/heap/stack - you don't get to start your program in someone else's already-running VM unless the …
All 17 Replies
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
cool_zephyr
7
Junior Poster in Training
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
cool_zephyr
7
Junior Poster in Training
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
cool_zephyr
7
Junior Poster in Training
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
somjit{}
60
Junior Poster in Training
Featured Poster
cool_zephyr
7
Junior Poster in Training
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
cool_zephyr
7
Junior Poster in Training
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
jwenting
1,889
duckman
Team Colleague
cool_zephyr
7
Junior Poster in Training
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.