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

Mandy Chung mandy.chung at oracle.com
Wed Nov 25 00:06:01 UTC 2015

> On Nov 24, 2015, at 3:45 PM, Peter Levart <peter.levart at gmail.com> wrote:
> On 11/24/2015 05:49 PM, Jaroslav Bachorik wrote:
>> 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.
> Isn't the following JDK9 API already providing that:
> ProcessHandle.current().info().arguments();

This is what I also start going after. 

The launcher does some job on the command-line before passing to the VM, e.g. @argfile support that expands the options specified in the file, add -Djava.class.path and some system properties passing to the VM, take out -J if they are JDK tool launchers etc.


More information about the core-libs-dev mailing list