JDK-8203378 : JDK build fails to compile javafx.graphics module-info.java if FX was built with OpenJDK
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: openjfx11
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-05-17
  • Updated: 2018-05-22
  • Resolved: 2018-05-22
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.
Other
openjfx11Fixed
Related Reports
Relates :  
Relates :  
Description
To reproduce this:

1. set your JAVA_HOME and PATH to point to an OpenJDK 10 build

2. build the JavaFX exports.zip for importing into a JDK build

$ gradle jdkZip

3. configure your local JDK build using "--with-import-modules=$JFX_ROOT/rt/build/javafx-exports.zip"

4. Build your JDK

It will fail with the following error:

Compiling 1 files for javafx.graphics
./build/linux-x86_64-normal-server-release/configure-support/import-modules/modules_src/javafx.graphics/module-info.java:76: warning: [module] module not found: jdk.packager
        jdk.packager;
           ^
error: warnings found and -Werror specified
1 error

This is due to the fix for JDK-8198329. In general, we use an Oracle JDK build to build FX for inclusion into the JDK, and use an OpenJDK for building standalone modules.

However, the intention was that a build of FX with OpenJDK would still produce bits that could be imported into a JDK build, even though that is no longer the primary mode of operation.

This now fails because of a qualified export from javafx.graphics to the no-longer-built jdk.packager module.
Comments
Changeset: 87f984d1ba8f Author: kcr Date: 2018-05-22 09:29 -0700 URL: http://hg.openjdk.java.net/openjfx/jfx-dev/rt/rev/87f984d1ba8f 8203378: JDK build fails to compile javafx.graphics module-info.java if FX was built with OpenJDK Reviewed-by: prr
22-05-2018

+1 again. -phil
22-05-2018

Based on discussion on openjfx-dev [1] I am reverting the changes to the .classpath files (only used by the Eclipse IDE). Here is the updated webrev for completeness: http://cr.openjdk.java.net/~kcr/8203378/webrev.01/ The two remaining modified files, build.gradle and module-info.java from javafx.graphics are unchanged from the .00 version. [1] http://mail.openjdk.java.net/pipermail/openjfx-dev/2018-May/021910.html
22-05-2018

+1 -phil.
21-05-2018

Webrev: http://cr.openjdk.java.net/~kcr/8203378/webrev.00/ The main part of this fix is the removal of the lone qualified export from javafx.graphics to jdk.packager. The fix also disables building the packager by default when building a bundled JDK release (e.g., when building with Oracle JDK 10) to match the behavior when building the standalone JavaFX bits with an OpenJDK 10 build. I took the opportunity to remove the references to jdk.packager from the Eclipse IDE files, since those were the only remaining references to the packager (aside from the now-disabled references in the gradle build files). I am happy to revert these changes if users of Eclipse prefer to address this separately or some other way.
21-05-2018

The solution is to remove the qualified export. Also, we should stop compiling the packager even when using an Oracle JDK (else we may run into other problems).
17-05-2018