Can I run more than one JVM? If yes then how can I find a particular class is loaded on which JVM?
You can run as many JVMs as you can fit on your disk and in memory :)
Whenever you start a Java application, you're first starting the JVM and then telling it which application to run. The answer to "which JVM" is simply: The JVM that you loaded the application with!
It's possible to do some esoteric fiddling with classloaders which would prove an exception to what I've just said. But it's true in the general case and the majority of all applications.
It's not entirely clear what you mean, but:
java
process, whether of the same JVM version or different onesUnless you're running a debugging agent or something similar, I don't know of any way to ask a JVM process whether it's loaded a particular class. It seems a bit of an odd requirement - why do you want to do this?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With