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?
Will the programs run in a single instance of JVM or will they run in two different instances of JVM?
That is up to you. The simplest approach is to use separate JVMs.