JDK-8136930 : Simplify use of module-system options by custom launchers
  • Type: Task
  • Component: core-libs
  • Sub-Component: java.lang.module
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-09-22
  • Updated: 2020-04-28
  • Resolved: 2016-08-10
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 b132Fixed
Related Reports
Blocks :  
Blocks :  
Blocks :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
System.getProperties has an @implNote to document the system properties: jdk.module.path, jdk.upgrade.module.path, jdk.module.main, and jdk.module.main.class.

We need to think through scenarios where custom launchers might need to do the equivalent of the java -X options, -XaddExports for example. At this time, then the system properties used to communicate the values of -XaddExports, -Xpatch etc are JDK-internal.
Comments
Eclipse issue related to the -addmods flag
23-06-2016

Added JDK-8156998 related to JDK-8156962
14-05-2016

The current proposal is to push handling of the module options into the VM. That will avoid the confusion between launcher and VM options and avoids needing to use awkward system properties. For javac, Jon has created JDK-8156962 to add an environment variable for the compilation environment and that may (needs investigation) provide a way to pick up or merge in configuration from the runtime environment.
14-05-2016

We should also decide/document whether the system properties can be used to inject values into a JVM (i.e. using -D as an alternative to options), or are they merely for code in a JVM to access values that were set by options. If values can be injected via -D, what is the relationship between properties and the equivalent options, and how do the uniqueness constraints play out?
20-04-2016

As things stand, we have: 1. java and javac have @argfile support 2. VM has -XX:VMOptionsFile=<file> which is like @argfile. 3. VM has _JAVA_OPTIONS and JAVA_TOOLS_OPTIONS (the latter specified in the JVM TI spec). The value of the env variable can include -XX:VMOptionsFile=<file> so it's possible to use _JAVA_OPTIONS="-XX:VMOptionsFile=project-options".
18-04-2016

One scenario is Oracle JDeveloper on Windows which has a custom launcher. For JDK9 we definitely need -XaddExports and -Xpatch.
04-03-2016