RFR: JDK-8187498: Add a -Xmanagement flag as syntactic sugar for -Dcom.sun.management.jmxremote.* properties

mandy chung mandy.chung at oracle.com
Thu Jan 25 16:01:17 UTC 2018


Hi Harsha,

JEP 293 [1] describes the guidelines for JDK command-line options.  As 
Alan points out, new options should move away from -X prefix but use 
`--` GNU-style long form option.  The guideline says:

The use of |-X| as a prefix to indicate "non-standard" options will be 
discontinued for new options, although command-line help may continue to 
draw a distinction between more commonly used options and those for 
advanced use.

You can consider `--management` as an alternative.  Should this be a 
launcher option that converts it to the corresponding 
`-Dcom.sun.management.jmxremote.<xxx>` rather than a VM option?

Mandy
[1] http://openjdk.java.net/jeps/293

On 1/24/18 11:21 PM, Harsha Wardhana B wrote:
>
> Hi Erik,
>
> The minimal command line would be,
>
> "-Xmanagement", that will start only the local management server.
>
> "-Xmanagement:local=true,port=aaaa" will start the remote management 
> server without SSL or authentication.
>
>
> On Wednesday 24 January 2018 06:13 PM, Erik Gahlin wrote:
>> Hi Harsha,
>>
>> Very nice to see progress on this!
>>
>> Before reviewing, the minimal command line to start up the default 
>> management server now becomes
>>
>> -Xmanagement:ssl=false,authenticate=false
> No. Please refer above for minimal options.
>>
>> and if you use a property that doesn't exist, or that is mandatory, 
>> you will get an error message stating what is wrong?
> If we use property, that doesn't exist, we get invalid option error. 
> As said before, no options are mandatory.
> /<log>//
> //./java -Xmanagement:ssl=true,authenticate=false,rmiregistry_ssl=true 
> HelloWorld//
> //Error: Invalid option specified: rmiregistry_ssl//
> //</log>/
>>
>> Could we reduce the command line further, so only a single property 
>> is needed:
>>
>> -Xmanagement:secure=false
>>
>> or perhaps:
>>
>> -Xmanagement:unsecure
>>
>> which would set ssl=false,authenticate=false, because that is what 
>> you want 99% of the time.
>>
>> Thanks
>> Erik
>>
> Thanks
> Harsha
>>> Hi,
>>>
>>> Please review the changes for above enhancement having webrev at,
>>>
>>> http://cr.openjdk.java.net/~hb/8187498/webrev.00/
>>>
>>> Thanks
>>> Harsha
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20180125/883aef8f/attachment.html>


More information about the serviceability-dev mailing list