JDK-8159675 : Define specification for JVM_GetJvmArguments
  • Type: Task
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 9
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2016-06-16
  • Updated: 2018-09-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Description
VM argument parsing includes the following:

JAVA_TOOLS_OPTION environment variable
Options passed via JNI invocation API
_JAVA_OPTION environment variable

-XX:VMOptionsFile is intended to protect the password not to be made visible from ps.  Similiarly, it should not be shown in jps.  -XX:Flags includes only VM -XX flags but no -XX prefix is specified in the Flags file.

java.lang.management.RuntimeMXBean::getInputArguments() specifies to return the VM input arguments.  It has a security permission check.  

In addition, -Djava.class.path=<classpath> is not included in the returned value of JVM_GetJvmArguments.

JVM_GetJvmArguments and other APIs need to be examined and specified what input arguments should be included.
Comments
These system properties are excluded from JVM_GetJvmArguments: if (!match_option(option, "-Djava.class.path", &tail) && !match_option(option, "-Dsun.java.command", &tail) && !match_option(option, "-Dsun.java.launcher", &tail)) { build_jvm_args(option->optionString); } "sun.java.command" and "sun.java.launcher" are implementation-specific that have no issue to exclude. There may be custom launcher setting -Djava.class.path when creating the HotSpot VM via JNI invocation API and that is considered as an input argument.
16-06-2016