load virtual machine once in windows ?

Discussion in 'Java' started by charly, May 14, 2004.

  1. charly

    charly Guest

    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 :)
    charly, May 14, 2004
    #1
    1. Advertising

  2. charly wrote:

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

    --
    Kind regards,
    Christophe Vanfleteren
    Christophe Vanfleteren, May 14, 2004
    #2
    1. Advertising

  3. In article <40a4cc7b$0$19014$>,
    charly <> wrote:
    >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
    --
    Bent Dalager - - http://www.pvv.org/~bcd
    powered by emacs
    Bent C Dalager, May 14, 2004
    #3
  4. charly

    Chris Smith Guest

    Bent C Dalager wrote:
    > 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
    Chris Smith, May 14, 2004
    #4
  5. charly wrote:

    > 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
    John C. Bollinger, May 14, 2004
    #5
    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. Bob Smith

    Once virtual, always virtual ?!?

    Bob Smith, Feb 4, 2004, in forum: C++
    Replies:
    8
    Views:
    571
    lilburne
    Feb 5, 2004
  2. FalkoG
    Replies:
    0
    Views:
    955
    FalkoG
    Dec 22, 2006
  3. Gancy
    Replies:
    4
    Views:
    174
    Rasto Levrinc
    Feb 3, 2005
  4. Andrew Berg
    Replies:
    0
    Views:
    162
    Andrew Berg
    Oct 4, 2012
  5. Dennis Lee Bieber
    Replies:
    0
    Views:
    166
    Dennis Lee Bieber
    Oct 5, 2012
Loading...

Share This Page