Java – Simultaneously run java programs run on same JVM

javajvm

Suppose I run two java programs simultaneously on the same machine. Will the programs run in a single instance of JVM or will they run in two different instances of JVM?

Best Answer

If you start each one with the java command (from the command line) they will run as totally separate JVMs.

"Programs" may be started as separate Threads running inside the one JVM.