I had been asked this question in interview, how to start jvm and can we have multiple jvm running on a single system?
Yes,you can install more than one jvm in your PC, because OS loads an instance of jvm (not whole jvm) in RAM. We can call different jvm like JDK 1.4 or JDK 1.6 by setting its path. Multiple JRE (Java Runtime Enviroment) is very possible. Multiple number of JVMs can run on a single machine.
Each Java application uses an independent JVM. Each JVM is a separate process, and that means there is no sharing of stacks, heaps, etcetera.
Each Application Server runs in one JVM.
Supports running applications (objects with main methods) and ScalaTest tests in multiple JVMs at the same time. Useful for integration testing where multiple systems communicate with each other.
Each Java application running uses an independent JVM.
Each JVM is a separate process, and they do not share stacks, heaps. Only common core JVM and native libraries will be shared.
You can have n number of application running on single machine/server box, and so as n number of JVM's.
Launching multiple java processes will create JVM for you.
In all you can have any number of JVM running in your machine, with even different JDK versions.
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