This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Two instances of JVM Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Two instances of JVM" Watch "Two instances of JVM" New topic

Two instances of JVM

swapnil dangore
Ranch Hand

Joined: Jun 05, 2006
Posts: 46
Hi all,
Could anybody tell me , what does it mean
Running two instances of JVM on same machin
This statement , i read (I forgot the source) regarding Threads

Cheers<br />-------------<br />Swapnil<br /> <br />SCJP5-81%<br /> <br />"Dictionary is the only place where Success come before Work"
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Not an advanced question. Moving...

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 37926
It is quite easy.
Open Command Prompt, navigate to wherever you have your Java programs, run a program.
Open Command Prompt, navigate to wherever you have your Java programs, run a program.

If you can persuade your programs to keep running long enough (if you need keyboard input for example), you will have two JVMs running simultaneously.

More difficult. Each JVM opens a Socket (or the application on each JVM connects to a Socket), and the two applications send messages to each other.
I agree. Here's the link:
subject: Two instances of JVM
Similar Threads
Issue with JBoss logging for different jboss instances running on same machine
Running multiple programs in single JVM
Multiple Tomcat on Same Machine(One JVM) + Total Initial Heap Size
JVM Instance
Q about JVM