[preview] Adding java.lang.Runtime.getVMArguments() method

Jaroslav Bachorik jaroslav.bachorik at oracle.com
Tue Nov 24 16:49:48 UTC 2015


Hi,

while working on an issue to clean up a code in java.base module using 
reflection to access RuntimeMXBean (from java.management module) in 
order to get hold of the VM arguments (yes, this won't work with module 
boundaries in place) it was pointed out that this functionality should 
be available in java.base without going through JMX.

For this, java.lang.Runtime seems to be the right place to add such 
functionality.
A new public method 'List<String> getVMArguments()' would be added with 
the same functionality as is currently provided by 
j.l.m.RuntimeMXBean#getInputArguments().

While the change seems to be rather non-controversional I would rather 
discuss it before going further with the implementation and requesting 
code review.

Thanks,

-JB-


More information about the serviceability-dev mailing list