JVM and java application

J

Jack

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.
 
K

Knute Johnson

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.
 
M

Mike Schilling

Knute said:
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.)
 
A

Arne Vajhøj

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
 
R

Roedy Green

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.
 
R

Roedy Green

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,010
Latest member
MerrillEic

Latest Threads

Top