Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Two JVM on Same computer ??

 
Bikash Paul
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9280
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't put either of the virtual machines in your path and invoke java with the full path.
 
Bikash Paul
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9280
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks,Now it is clear to me.
Thanks
Bikash
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic