JVM as service

Discussion in 'Java' started by Jonathan Neve, Sep 8, 2004.

  1. 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.
    Jonathan Neve, Sep 8, 2004
    #1
    1. Advertising

  2. Jonathan Neve

    Grant Wagner Guest

    Jonathan Neve wrote:

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

    --
    Grant Wagner <>
    Grant Wagner, Sep 10, 2004
    #2
    1. Advertising

  3. Jonathan Neve

    Anindo Ghosh Guest

    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



    (Jonathan Neve) wrote in message news:<>...
    > 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.
    Anindo Ghosh, Sep 16, 2004
    #3
  4. (Jonathan Neve) wrote in message news:<>...
    > 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
    Mark A. Washburn, Sep 17, 2004
    #4
  5. Jonathan Neve

    Lans Redmond Guest

    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


    "Jonathan Neve" <> wrote in message
    news:...
    > 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.
    Lans Redmond, Jan 2, 2005
    #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. Replies:
    2
    Views:
    5,537
    ginnybrighton
    Sep 27, 2007
  2. Tohru Kao
    Replies:
    3
    Views:
    412
    Neil Masson
    Jul 14, 2003
  3. Kevin Hooke

    Re: Handling both MS JVM and Sun JVM

    Kevin Hooke, Aug 26, 2003, in forum: Java
    Replies:
    2
    Views:
    854
  4. Lasse
    Replies:
    1
    Views:
    675
    Jon A. Cruz
    Jan 5, 2004
  5. Young-Jin Lee

    MS JVM and Sun JVM problem

    Young-Jin Lee, Jan 20, 2004, in forum: Java
    Replies:
    3
    Views:
    559
    Mickey Segal
    Jan 21, 2004
Loading...

Share This Page