JVM and java application

Discussion in 'Java' started by Jack, Jan 25, 2010.

  1. Jack

    Jack Guest

    If there are several java applications/programs running on the same
    machine, are these java applications/programs using their own JVMs or
    are they share the same JVM?

    Thanks.
     
    Jack, Jan 25, 2010
    #1
    1. Advertising

  2. On 1/24/2010 7:56 PM, Jack wrote:
    > If there are several java applications/programs running on the same
    > machine, are these java applications/programs using their own JVMs or
    > are they share the same JVM?
    >
    > Thanks.


    Each time you start a Java app, you create a new JVM. That's not to say
    that you can't have a Java program that loads other Java programs if you
    want them run on the same JVM. I don't know what the state of things is
    in browsers for sure but I would suspect that every applet that is
    loaded gets its own JVM.

    --

    Knute Johnson
    email s/nospam/knute2010/
     
    Knute Johnson, Jan 25, 2010
    #2
    1. Advertising

  3. Knute Johnson wrote:
    > On 1/24/2010 7:56 PM, Jack wrote:
    >> If there are several java applications/programs running on the same
    >> machine, are these java applications/programs using their own JVMs
    >> or
    >> are they share the same JVM?
    >>
    >> Thanks.

    >
    > Each time you start a Java app, you create a new JVM. That's not to
    > say that you can't have a Java program that loads other Java
    > programs
    > if you want them run on the same JVM. I don't know what the state
    > of
    > things is in browsers for sure but I would suspect that every applet
    > that is loaded gets its own JVM.


    Web servers and application servers, in general, run all of their
    applications in a single JVM (or perhaps a replicated set of JVMs,
    each of which can run any of their applications.)
     
    Mike Schilling, Jan 25, 2010
    #3
  4. Jack

    Arne Vajhøj Guest

    On 25-01-2010 01:17, Mike Schilling wrote:
    > Knute Johnson wrote:
    >> On 1/24/2010 7:56 PM, Jack wrote:
    >>> If there are several java applications/programs running on the same
    >>> machine, are these java applications/programs using their own JVMs
    >>> or
    >>> are they share the same JVM?

    >>
    >> Each time you start a Java app, you create a new JVM. That's not to
    >> say that you can't have a Java program that loads other Java
    >> programs
    >> if you want them run on the same JVM. I don't know what the state
    >> of
    >> things is in browsers for sure but I would suspect that every applet
    >> that is loaded gets its own JVM.

    >
    > Web servers and application servers, in general, run all of their
    > applications in a single JVM (or perhaps a replicated set of JVMs,
    > each of which can run any of their applications.)


    Java EE has a different application concept than Java SE.

    Seen from Java SE perspective the app server is the app
    and the ear's are plugins.

    Seen from Java EE perspective the ear's are multiple apps.

    Arne
     
    Arne Vajhøj, Jan 26, 2010
    #4
  5. Jack

    Roedy Green Guest

    On Sun, 24 Jan 2010 19:56:59 -0800 (PST), Jack <>
    wrote, quoted or indirectly quoted someone who said :

    >If there are several java applications/programs running on the same
    >machine, are these java applications/programs using their own JVMs or
    >are they share the same JVM?


    logically they each have their own JVM, unless you use Echidna.
    See http://mindprod.com/jgloss/echidna.html

    However most of the JVM on windows is implemented with DLLs which is
    shared code. So you have shared code and separate heaps for data.
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com
    Don’t be discouraged by a failure. It can be a positive experience. Failure is, in a sense, the highway to success, inasmuch as every discovery of what is false leads us to seek earnestly after what is true, and every fresh experience points out some form of error which we shall afterwards carefully avoid.
    ~ John Keats (born: 1795-10-31 died: 1821-02-23 at age: 25)
     
    Roedy Green, Jan 26, 2010
    #5
  6. Jack

    Roedy Green Guest

    On Mon, 25 Jan 2010 22:42:38 -0800, Roedy Green
    <> wrote, quoted or indirectly quoted
    someone who said :

    >
    >logically they each have their own JVM, unless you use Echidna.
    >See http://mindprod.com/jgloss/echidna.html
    >
    >However most of the JVM on windows is implemented with DLLs which is
    >shared code. So you have shared code and separate heaps for data.


    Even though they share code, the who JVMs are not aware of the
    existence of the other.

    OS puts code in read-only, thus shareable memory. It puts data is
    separate read-write memory.

    The RAM hardware is identical. It is just the memory addressing
    hardware is told to block writes to parts of RAM containing code.
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com
    Don’t be discouraged by a failure. It can be a positive experience. Failure is, in a sense, the highway to success, inasmuch as every discovery of what is false leads us to seek earnestly after what is true, and every fresh experience points out some form of error which we shall afterwards carefully avoid.
    ~ John Keats (born: 1795-10-31 died: 1821-02-23 at age: 25)
     
    Roedy Green, Jan 26, 2010
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Hooke

    Re: Handling both MS JVM and Sun JVM

    Kevin Hooke, Aug 26, 2003, in forum: Java
    Replies:
    2
    Views:
    877
  2. Lasse
    Replies:
    1
    Views:
    700
    Jon A. Cruz
    Jan 5, 2004
  3. Young-Jin Lee

    MS JVM and Sun JVM problem

    Young-Jin Lee, Jan 20, 2004, in forum: Java
    Replies:
    3
    Views:
    575
    Mickey Segal
    Jan 21, 2004
  4. Sven Jacobs
    Replies:
    3
    Views:
    29,253
    Robert Klemme
    Feb 20, 2006
  5. Trage steenarend

    J2ME application in JVM J9

    Trage steenarend, Apr 7, 2006, in forum: Java
    Replies:
    0
    Views:
    616
    Trage steenarend
    Apr 7, 2006
Loading...

Share This Page