JDK-8140767 : Add -XaddReads to javac
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-10-29
  • Updated: 2016-02-17
  • Resolved: 2016-02-17
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-repo-jigsawFixed
Related Reports
Relates :  
Relates :  
Description
-XaddReads, corresponding to the runtime -XaddReads option, should be added to javac.
Comments
Patch adding -XaddReads: http://hg.openjdk.java.net/jigsaw/jake/langtools/rev/2c1838c6e03c
17-02-2016

I've filled the problem with name module seeing classpath types under JDK-8150092.
17-02-2016

The issue that I noted on 2016-01-11 seems to be fixed now and the compile fails as expected. Is -XaddReads:<module>=ALL-UNNAMED implemented? I wasn't able to get a test modules with a reference to a type in the unnamed module with this command-line option.
10-02-2016

I did a few experiments with javac today and it seems that if -cp is specified when compiling a module that the module reads ALL-UNNAMED. That is, I can include a reference in my module to a type on the class path. Is this expected?
11-01-2016

JDK-8133881 seems to be tracking adding javac -liimtmods.
09-01-2016

We'll also need the full set of -addmods, -limitmods, and for completeness, -Xbootclasspath/a:
29-10-2015