Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4187333

let multiple VMs share code & constant pools

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.0, 1.3.0
    • hotspot
    • generic, x86
    • generic, solaris_8, windows_95, windows_98, windows_nt



      Name: ap32198 Date: 11/04/98


      I think that by Java 1.3 (or 2.0, or whatever...)
      running Java programs will be common enough that
      the current totally-separate-vm-for-each-program
      will become inadequate. In fact, I already find
      it extremely difficult to run more than two Swing
      programs at the same time, because each VM loads
      (and compiles, etc.) its own totally separate
      copy of the core classes. Since Java is by now
      effectively a lightweight operating system,
      having to load a separate copy for each program
      is bothersome. I propose that in the next
      release of Java, launching any VM beyond the
      first one simply "tie in" to the already-
      running VM, that is, typing the "java" command
      would mean "start the VM if it isn't already,
      or command the existing VM to spawn a new
      (lightweight) VM if it is". (This isn't unusual
      -- on Windows, at least, double-clicking on
      the Netscape icon while Netscape is running will
      simply launch a new browser window rather than
      a totally sepearate copy of the program). It
      will make running multiple Java programs very
      cheap, in fact cheaper than running multiple
      native programs, because Java programs have no
      overhead other than the core classes.
      Naturally, it would be quite a bit of work to
      ensure that two "lightweight" vm's have the
      exact same behavior as two "heavyweight" vm's
      (each has a separate copy of all static variables,
      etc.) but I think it's worth the effort.
      It certainly makes sense for an all-Java
      operating system to simply be able to spawn
      a new Java VM to run a program in, while sharing
      all of its core classes/constant pool (please
      have a public API for this!).
      I would also expect this to reduce the startup
      time associated with the JDK tools, such as
      javac, as long as a VM is already running (and
      you should probably include a new parameter on
      the java command, maybe -persist, that means
      "hang around indefinitely" so we could just start
      one VM and then every invocation of every Java
      program would have zero startup cost). Let
      Microsoft chew on that one!
      (Review ID: 39273)
      ======================================================================

            foliversunw Fred Oliver (Inactive)
            apalanissunw Anand Palaniswamy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: