RFR 8210670 (S): Accept double-dash VM-name options at launch time

mandy chung mandy.chung at oracle.com
Thu Sep 13 02:04:19 UTC 2018



On 9/12/18 2:16 PM, mark.reinhold at oracle.com wrote:
> To make this trivial enhancement I first had to fix some broken tests,
> so there are two issues and two webrevs here.
>
> 8210669: Some launcher tests assume a pre-JDK 9 run-time image layout
>
>    Two launcher tests, ExecutionEnvironment.java and Test7029048.java (in
>    test/jdk/tools/launcher), still assume the old image layout in which a
>    HotSpot shared library (libjava.so) is found in $JDK/lib/$ARCH/$VMTYPE
>    on Linux and Solaris.  The intermediate $ARCH directory was removed in
>    JDK 9, as part of JEP 220 (Modular Run-Time Images) [1].  Since that
>    time these tests have been succeeding anyway, because they don’t fail
>    when the requested VM is not found.
>
>    The tests should be fixed to fail when the requested VM is not found,
>    and to look for VM shared libraries in the proper location.
>
>    JBS: https://bugs.openjdk.java.net/browse/JDK-8210669
>    Webrev: http://cr.openjdk.java.net/~mr/rev/8210669/

This looks okay.
> 8210670: Accept double-dash VM-name options at launch time
>
>    Per JEP 293 (Guidelines for JDK Command-Line Tool Options) [2], 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.
>
>    JBS: https://bugs.openjdk.java.net/browse/JDK-8210670
>    Webrev: http://cr.openjdk.java.net/~mr/rev/8210670/

jvm.cfg allows to specify an alias.  Have you considered leveraging 
jvm.cfg alias mechanism?

--server KNOWN ALIASED_TO -server
--client KNOWN ALIASED_TO -client

That'd invoke change in make/Copy-java.base.gmk as well as jvm.cfg to 
require the option
to start with `--` whereas the alias starts with `-`.

Mandy


More information about the core-libs-dev mailing list