Running 1 VM for more Java programs

P

Pansje

Hi all,

I get the impression that each time I start a Java program, a new VM is
started (taskmanager shows java.exe of about 13M for each start). Is this
really true, or is taskmanager "confused".

Also I'm not impressed by the startup time of even the most simple
application. I assume that most of the time is spend on starting the VM.
Is there a way to start the VM only once, and use that instance for all java
programs ??

Cheers,
Hans
 
R

Roedy Green

I get the impression that each time I start a Java program, a new VM is
started (taskmanager shows java.exe of about 13M for each start). Is this
really true, or is taskmanager "confused".

That's true. However IIRC there is now a DLL so you don't use quite as
much RAM as you used to. See http://mindprod.com/jgloss/echidna.html
for a way to run several apps in one JVM.
Also I'm not impressed by the startup time of even the most simple
application. I assume that most of the time is spend on starting the VM.
Is there a way to start the VM only once, and use that instance for all java
programs ??

Agreed. The problem is Sun sells servers where the startup time does
not matter. I have some ideas to speed up desktop startup time.
see http://mindprod.com/projects/gespenster.html
http://mindprod.com/projects/suspendedanimation.html


One of the things you can do today is statically compile to exe. See
http://mindprod.com/jgloss/nativecompiler.html
http://mindprod.com/jgloss/jet.html
 
I

IchBin

Thanks Roedy, that sound very cool!

Roedy Green said:
That's true. However IIRC there is now a DLL so you don't use quite as
much RAM as you used to. See http://mindprod.com/jgloss/echidna.html
for a way to run several apps in one JVM.


Agreed. The problem is Sun sells servers where the startup time does
not matter. I have some ideas to speed up desktop startup time.
see http://mindprod.com/projects/gespenster.html
http://mindprod.com/projects/suspendedanimation.html


One of the things you can do today is statically compile to exe. See
http://mindprod.com/jgloss/nativecompiler.html
http://mindprod.com/jgloss/jet.html
 
C

Chris Uppal

Pansje said:
I get the impression that each time I start a Java program, a new VM is
started (taskmanager shows java.exe of about 13M for each start). Is this
really true, or is taskmanager "confused".

It's true.

Also I'm not impressed by the startup time of even the most simple
application.

Neither is anyone else. Sun not excluded.

I assume that most of the time is spend on starting the VM.
Yup.


Is there a way to start the VM only once, and use that instance for all
java programs ??

People have been working on such ideas, but I think that, at least for the time
being, the emphasis (at Sun) has moved back towards making the JVM start
faster. Their next release (now in beta) has features that reduce the startup
time considerably.

-- chris
 
P

Pansje

Roedy Green said:
That's true. However IIRC there is now a DLL so you don't use quite as
much RAM as you used to. See http://mindprod.com/jgloss/echidna.html
for a way to run several apps in one JVM.

Thanks, looks nice, however I get the impression that
http://www.javagroup.org/echidna/ is a bit dead: "What's new" is from June
2001. I downloaded a doc: 1999. Couple of links on the html page don't work.
I downloaded the software: doesn't start.

However, the sources are available, so I might try to solve the problem, as
it seems that it's just a wrong (or outdated?) package name. Also i might
look a little further, perhaps the project is continued elsewhere.

Cheers,
Hans
 
P

Pansje

Hi all,

Just wanted you to know that I got it working.
Indeed I had to change the code a little because a class had the same name
as in Java.
- In ProcessManagerHolder.java and in StandardProcessManager.java I added
org.javagroup.util. before URLClassLoader.decodePathString.

Perhaps my previous remark that the project is dead, might be interpreted a
little different:
The project is finished.

Cheers,
Hans
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top