JDK-8049507 : Specify jdk.Exported-ness for com.sun.java.swing
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 8,9
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2014-07-08
  • Updated: 2018-09-05
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.
Related Reports
Relates :  
The Java files in the com.sun.java.swing package and subpackages do *not* have a jdk.Exported annotation to indicated whether or not those types are intended to be used outside of the JDK.

All com.sun.* files as of JDK 8 should have a jdk.Exported marking to ease the transition to modules in JDK 9.
In my estimation, we should have jdk.Exported annotations in both JDK 8 and JDK 9 to allow users to manage their transitions to JDK 9 using the same tool set. For com.sun.java.swing, jdk.Exported annotations should be added to in an 8 update release (as well as JDK 9, IMO).

I don't think this is needed for JDK 9. In our module definitions then com.sun.java.swing is not exported so attempts to use it will fail at both compile-time and runtime. See also JDK-8049422 where we need to figure out what to do with jdk.Exported in JDK 9.