Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to create two JVMs on one machine?

Status
Not open for further replies.

royc75

Programmer
Jun 1, 2006
127
GB
Hello,

Is it possible to create two JVMs on one machine?
 
Yes. Just start two instances of the java executable.

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Cool, and can I decide at which one of these instances my application will work?
 
When I start one JVM I use java MyClass in order to run my application, how will do it when two JVMs are running? I am still using the same java.exe from the same folder.
I know I miss something here I just don't know what...
 
Do you want to run two Java-programs in their own JVM - one Java-Version, but two instances,
- or -
run two different JVMs?

The first case is trivial.
The second needs you to install the second version in a differnet location.
Only one of them is the first found in the path, so you have to call the whole path to second:
Code:
java.exe Foo
C:\Programs\J2SDK-1.4\bin\java.exe Foo

seeking a job as java-programmer in Berlin:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top