JDK-8157986 : Runtime support for javac to determine arguments to the runtime environment
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-05-26
  • Updated: 2016-06-16
  • Resolved: 2016-05-27
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.
JDK 9
9 b121Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
javac needs a way to determine the VM arguments to the runtime environment.  

ProcessHandle.Info::arguments returns the arguments to the process.  When javac is launched on the command-line, ProcessHandle.Info::arguments returns the arguments to javac rather than the runtime environment in javac.

Comments
RuntimeMXBean::getInputArguments returns the input arguments to the VM but this will pull in java.rmi which of course jdk.compiler would avoid. This issue refactors the existing support and provides a private API for javac to experiment. We should also determine whether a public Java SE API is useful to be provided for other use cases in the future.
26-05-2016