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

Accept double-dash VM-name options at launch time

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • tools
    • None
    • behavioral
    • minimal
    • This change will cause new launcher options to be accepted. It will not change the behavior of existing launcher options.
    • add/remove/modify command line option
    • JDK

      Summary

      Enhance the Java launcher so that --server is accepted to select the server VM, in addition to -server, and likewise for any other VMs listed in the $JDK/lib/jvm.cfg file.

      Problem

      JEP 293 (Guidelines for JDK Command-Line Tool Options) recommends that long options start with two dashes rather than one. The VM-selection options to the launcher, e.g., -server, can only be specified with one dash. For ease of use, it should also be possible to specify them with two dashes, e.g., --server.

      This is a more apparent problem now that we're about to introduce the "nonspeculative" VM in JEP 342 (Limit Speculative Execution).

      Solution

      Enhance the Java launcher so that --server is accepted to select the server VM, in addition to -server, and likewise for any other VMs listed in the $JDK/lib/jvm.cfg file.

      Specification

      If the JDK is built with, e.g., the client VM, then the output of the java --help command will change from:

      -client       to select the "client" VM

      to:

      --client      to select the "client" VM
      -client       is a synonym for the "client" VM  [deprecated]

      and similarly for any VM other than the default server VM.

            mr Mark Reinhold
            mr Mark Reinhold
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: