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.
- csr of
-
JDK-8210670 Accept double-dash VM-name options at launch time
-
- Open
-