JVM as service

J

Jonathan Neve

Hi all!

Has anyone ever tried to make the JVM into a OS service, so that
instead of having to load it for each and every Java application, it
could be loaded once by the OS at startup. Then, if you want to launch
a Java application, all you would have to do would be to call the JVM
service, and tell it which class to load, in exactly the same way as
it is now. The only difference would be that the JVM wouldn't have to
be loaded every time, which would considerably reduce both startup
time and memory consumption.

Has anyone done this? Any ideas?

Thanks!
Jonathan Neve.
 
G

Grant Wagner

Jonathan said:
Hi all!

Has anyone ever tried to make the JVM into a OS service, so that
instead of having to load it for each and every Java application, it
could be loaded once by the OS at startup. Then, if you want to launch
a Java application, all you would have to do would be to call the JVM
service, and tell it which class to load, in exactly the same way as
it is now. The only difference would be that the JVM wouldn't have to
be loaded every time, which would considerably reduce both startup
time and memory consumption.

Has anyone done this? Any ideas?

Some useful(?) resources:

<url:
http://java.sun.com/j2se/jcp/AppIsolationAPI/oopsla00-czajkowski-final.pdf
/>
<url: http://research.sun.com/projects/barcelona/papers/usenix03.pdf />
<url:
http://wwws.sun.com/software/sunone/innercircle/newsletter/0404cto.html />

I think Sun has been working on "sharing" a virtual machine for a long
time, but haven't come up with a satisfactory solution.
 
A

Anindo Ghosh

Hi,

Is it a good idea to execute a program with an infinite loop and with
the main thread in sleep state most of the time so that all the dlls
of JVM are pre loaded when ever we execute another program ?

Regards,
Anindo Ghosh
 
M

Mark A. Washburn

Hi all!

Has anyone ever tried to make the JVM into a OS service, so that
instead of having to load it for each and every Java application, it
could be loaded once by the OS at startup. Then, if you want to launch
a Java application, all you would have to do would be to call the JVM
service, and tell it which class to load, in exactly the same way as
it is now. The only difference would be that the JVM wouldn't have to
be loaded every time, which would considerably reduce both startup
time and memory consumption.

Has anyone done this? Any ideas?

Thanks!
Jonathan Neve.

Jsh may interest you.

Jsh is a java application shell where all Java applications run in a
single Java virtual machine ( JVM), saving memory and launching Java
applications faster.

Homepage,
http://gerard.collin3.free.fr/
Download,
http://sourceforge.net/projects/jsh/

Jsh is currently an integration within JDistro. JDistro Warf mode may
interest you, also.

maw
 
L

Lans Redmond

yes, what you need to do is write two classes,
one is a java launcher(server) and the other is a client which passes
objects to the launcher. The launcher will load the object and look for the
main method to run. If it finds one then it will run it within its own jvm.

There is a book out by Oriely, Java Performance tuning that explains how to
do it in more details, I think you can find it on the java.sun.com website.

I use this so that all our applications uses one jvm for better performance.
ou will only need to worry about your heap size
 

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,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top