load virtual machine once in windows ?

C

charly

Greetings,

I often hear people complain that "Java is soooooo slow". Then they are
patiently told that (generally speaking) it is not the program which is
slow but the launching of the virtual machine.
Fine.
Under windows for instance, would it be possible to load the JVM during
windows startup just one time and then it stays there (as a service for
ex for people with little ram, who could then stop it). And when a
"class" program is clicked, it is forwarded to the JVM.

I am fully aware that it is not in microsoft interests in its fight
against sun.
I know also of the virtual machine required for dotnet

Another way of doing it could be to launch a java program at windows
startup which would then grab any class program which is handed to him

It is some sort of a hack and easiest said than done but well, I'd like
to hear you opinions.

thanks !

Ps : I'm really curious and this is no TROLL :)
 
C

Christophe Vanfleteren

charly said:
Greetings,

I often hear people complain that "Java is soooooo slow". Then they are
patiently told that (generally speaking) it is not the program which is
slow but the launching of the virtual machine.
Fine.
Under windows for instance, would it be possible to load the JVM during
windows startup just one time and then it stays there (as a service for
ex for people with little ram, who could then stop it). And when a
"class" program is clicked, it is forwarded to the JVM.

I am fully aware that it is not in microsoft interests in its fight
against sun.
I know also of the virtual machine required for dotnet

Another way of doing it could be to launch a java program at windows
startup which would then grab any class program which is handed to him

It is some sort of a hack and easiest said than done but well, I'd like
to hear you opinions.

thanks !

Ps : I'm really curious and this is no TROLL :)

Steps have been taken with JDK 1.5 to lower the memory requirements of new
instances of the JVM by having parts of all the core classes (java.*,
javax.* ) memory mapped to a file.

Each instance of the JVM then uses this file to load those classes.

It's explained in detail here:
<http://java.sun.com/j2se/1.5.0/docs/guide/vm/class-data-sharing.html>
 
B

Bent C Dalager

Under windows for instance, would it be possible to load the JVM during
windows startup just one time and then it stays there (as a service for
ex for people with little ram, who could then stop it). And when a
"class" program is clicked, it is forwarded to the JVM.

As far as I can recall, there was an effort called the "Isolation API"
that would make this possible. I don't know the status of that effort,
however.

Cheers
Bent D
 
C

Chris Smith

Bent said:
As far as I can recall, there was an effort called the "Isolation API"
that would make this possible. I don't know the status of that effort,
however.

There are two possible approaches to this issue. The "Isolation API"
was from the rather counterintuitive direction of treating the problem
as fundamentally one Java application doing several things, but the
things need to be separated. The other direction, which IIRC was chosen
and partially implemented in Java 1.5, is to treat different
applications as fundamentally different applications that just want to
share some JIT work and class loading.

The isolation stuff may still be useful for cases where different tasks
run concurrently but perform a single service which the user wants to
interact with as one process... but it's not the solution to startup
time for unrelated Java applications.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
J

John C. Bollinger

charly said:
Greetings,

I often hear people complain that "Java is soooooo slow". Then they are
patiently told that (generally speaking) it is not the program which is
slow but the launching of the virtual machine.

You are overgeneralizing. VM startup typically takes a few seconds. It
is therefore only an issue with programs that are supposed to run on
that time scale or faster. There are a whole class of complaints about
Java being slow in general; these are typically related to programs that
perform extensive computations or data manipulation. In point of fact,
however, these complaints are not particularly well founded against
recent Java implementations, and even historically they have sometimes
been more related to poor code than to poor VMs.
Under windows for instance, would it be possible to load the JVM during
windows startup just one time and then it stays there (as a service for
ex for people with little ram, who could then stop it). And when a
"class" program is clicked, it is forwarded to the JVM.

Yes, that's conceivable.
Another way of doing it could be to launch a java program at windows
startup which would then grab any class program which is handed to him

That's not appreciably different from your first suggestion.
It is some sort of a hack and easiest said than done but well, I'd like
to hear you opinions.

It could be done very smoothly indeed, I'm sure, but it's not of
sufficient interest to me to advocate for it.


John Bollinger
(e-mail address removed)
 

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,019
Latest member
RoxannaSta

Latest Threads

Top