• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Instance of JVM?

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The value of a Java reference has meaning only within the context of a single instance of a JVM. In other words, if you tried to restore the object in another instance of the JVM, even running on the same computer on which the object was originally serialized, the reference would be useless.
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is this a question or a statement ?

Define useless.
 
Soumya Ranjan Mohanty
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am sorry i was not clear. Actually i want to know what is an instance of JVM.
 
Deepak Bala
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you run 2 java processes, you have 2 JVM instances running on the system with a separate heap allocated to each one.

Of course I am trying to boil down the concept and present to you a single line which would be simple to understand. If your question has a more specific direction, I can follow it up with an answer that is more narrow.
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Soumya

Please bear in mind that whenever you talk about JVM, you may be actually talking about three different things:

1) The abstract Specification.

2) A concrete implementation (of spec)

3) A run-time instance of a Java Virtual Machine.

The aim or mission of a run-time instance of JVM is : to run one Java Application.

When a Java application starts, a run-rime instance of JVM is born and when application completes/terminates, the instance dies.
Each Java application runs inside its own run-time instance of JVM.
i.e. If you start three Java Application on the same computer, using the same concrete implementation of JVM, three seperate run-time instance will born, for each application.

@For the curious: A run-time instance of Java Virtual Machine continues to live as long as any non-daemon threads are running. When all non-daemon threads of application terminates, the run-time instance of JVM will die.


Note: This excerpt is from a MUST READ book - Inside the Java Virtual Machine by Bill Venners. One can also check out : Java Corner-Artima


Hope it helps.

Himanshu Mall
@mall.himanshu84@gmail.com

 
My previous laptop never exploded like that. Read this tiny ad while I sweep up the shards.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic