This week's book giveaway is in the General Computing forum.
We're giving away four copies of Learning Regular Expressions and have Ben Forta on-line!
See this thread for details.
Win a copy of Learning Regular Expressions this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Multiple JVM in same machine  RSS feed

 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If we run two java application on same machine, will both of them will be having differrent JVM?

If we are having two instances of ecllipse running on same machine, each of them are having their own JVM or they are sharing one JVM ?

Please direct me the link where i can find more information about this issue
 
author and iconoclast
Sheriff
Posts: 24220
40
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Each instance of the program "java.exe" on Windows is a separate JVM. If you start any two Java-based processes on your computer, they will each be running in their own JVM , whether they be Eclipse or anything else.

Hopefully this is enough information for you; I can't imagine what sort of link would provide any more information than that.

Moving to Java in General (Beginner).
 
Mohd Fuzail
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ernest for the information.

Can provide any online tutorial link or specification which talks in details about multiple JVM
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24220
40
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Mohd Fuzail:

Can provide any online tutorial link or specification which talks in details about multiple JVM



If you have some specific question, just ask it, please. But there is no such thing as "an online tutorial about multiple JVM."
 
Mohd Fuzail
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did my SCJP way back in 2001 and i was surprised to know that this multiple JVM issue i never read or encountered till date

So i was wondering if some book or specification talks about each java.exe program invoking and running in it's own JVM

Sorry for streching the issue, but i need to read and go in details about this issue
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24220
40
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What issues? What details? What did you expect your SCJP study materials to go into?

If there's some specific question you have, please ask it. But there is no "SCJP Guide to Multiple JVMs" any more than there is an "SCJP Guide to Spelling 'int'." Once you know the answer, you know it -- there's nothing more to it!
 
lowercase baba
Bartender
Posts: 12627
50
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
are you trying to have two different VERSIONS of java on your pc at the same time?

or do you simply want to have two JVMs running at the same time? the second is easy. go to your command prompt and type "java <class>", which will start up a JVM and your program.

then, while that program is running, type "java <class>", and start another program running. this will then start up a second JVM. you will then have two JVMs running until one of your apps shuts down.
 
Ranch Hand
Posts: 52
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a question on that...


When we need to call a method of ObjectB in Jvm2 from a client ClassA which is in another jvm Jvm1.. We need to use RMI ...

Does the same apply to 2 Jvms running in the same machine and sharing same memory (RAM)..

Can we create sample RMI code and test it on the same machine ??
 
Marshal
Posts: 60199
188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Two JVMs cannot run and share memory. Each has its own heap, in different areas of RAM.
You would need to use sockets, multiple agents, RMI or similar to access code on different JVMs. You can try it out with two JVMs on the same machine, yes.
 
Abhineet Kapil
Ranch Hand
Posts: 52
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Campbell..

Can you please help with some basic material/link on this subject.

I want to write a simple class object in one jvm calling the method of another object in another jvm .. Both Jvms are on the same machine..

Thanks ..
 
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could start by googling for something like java rmi tutorial.
 
Abhineet Kapil
Ranch Hand
Posts: 52
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jeff ..

Will follow that...
 
Campbell Ritchie
Marshal
Posts: 60199
188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jeff Verdegan wrote:You could start by googling for something like java rmi tutorial.

You might find something here.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!