JDK-8210615 : Swing interop requires qualified exports when run with JDK 10
  • Type: Bug
  • Component: javafx
  • Sub-Component: swing
  • Affected Version: openjfx11
  • Priority: P3
  • Status: Closed
  • Resolution: Other
  • Submitted: 2018-09-11
  • Updated: 2018-10-01
  • Resolved: 2018-09-11
Related Reports
Relates :  
Sub Tasks
JDK-8210616 :  
Description
The unbundled JavaFX 11 release runs with JDK 10 or later. Prior to JDK 11, the javafx.swing module relied upon qualified exports of internal packages from java.desktop. Now that the javafx.swing module is no longer a part of the JDK, these qualified exports must be specified at runtime.

These qualified exports are not required when running JavaFX 11 with JDK 11 or later.
Comments
We recommend running JavaFX 11 with JDK 11, in which case there is no problem. WORKAROUND: When running JavaFX 11 with JDK 10, the workaround is to add the following four qualified exports on the 'java' command line or in an args file referred to with an '@' argument passed to the 'java' command line. --add-exports=java.desktop/java.awt.dnd.peer=javafx.swing --add-exports=java.desktop/sun.awt=javafx.swing --add-exports=java.desktop/sun.awt.dnd=javafx.swing --add-exports=java.desktop/sun.swing=javafx.swing
12-09-2018

See the following comment from JDK-8195811 for more information: https://bugs.openjdk.java.net/browse/JDK-8195811?focusedCommentId=14175518&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14175518
11-09-2018