This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Java in General and the fly likes Two JVM on Same computer ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Two JVM on Same computer ??" Watch "Two JVM on Same computer ??" New topic
Author

Two JVM on Same computer ??

Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342
Hi,
Can I install two JVM on Same computer and Can I run two program at a time on different JVM on same computer.If it is possible then how ?
Thanks & Regards
Bikash
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8935
    
    9

Don't put either of the virtual machines in your path and invoke java with the full path.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342
Hi,
That means we can install and run two program on different JVM at a time on same computer only I have to give full path of each JVM during running of my class file in set path variable.Am I right ?
Thanks & Regards
Bikash
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8935
    
    9

Originally posted by Bikash Paul:

That means we can install and run two program on different JVM at a time on same computer

Yes. For example, on my computer i invoke either:
c:\jdk1.3.1_07\bin\java
c:\j2sdk1.4.2_01\bin\java

only I have to give full path of each JVM during running of my class file

So far so good:
c:\jdk1.3.1_07\bin\java myClassFile
c:\j2sdk1.4.2_01\bin\java myClassFile

in set path variable.

You lost me. If you need to set up unique classpaths for the different VM's, you'd best do it inside a batch file or shell script or by making a shortcut which specifies the classpath on the command line via the -cp argument.
Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342
Hi,
Thanks,Now it is clear to me.
Thanks
Bikash
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
I'm not sure if this is what you were originally asking, but it's also possible to have two or more JVM processes which use the same JVM files (same installation). Every time you type "java [classname]" you create a new JVM process using whatever JVM installation is found first in your PATH. So in this sense, it's easy to get two JVMs without needing to install two differrnt JVM versions. I don't know if that's what you really need here, but didn't want you to overlook the simpler solution if it's sufficient for you.


"I'm not back." - Bill Harding, Twister
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Two JVM on Same computer ??