JDK-8300697 : JavaFX build fails when using a boot JDK that includes javafx.* modules
  • Type: Bug
  • Component: javafx
  • Sub-Component: build
  • Affected Version: jfx20
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2023-01-19
  • Updated: 2024-11-23
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
tbdUnresolved
Related Reports
Blocks :  
Description
There are two modes of building JavaFX depending on whether you are building using a boot JDK with or without javafx.* modules.

1. Boot JDK does not have javafx.* modules

This is the mode used to build the JavaFX standalone sdk and jmods. Building the sdk requires a boot JDK without the javafx.* modules.

2. Boot JDK includes the javafx.* modules

This is a mostly legacy mode, but some vendors still use this to generate a set of modules in a form that can be imported into a custom JDK build to include them into that newly built JDK. In this mode, no standalone SDK is built, so it is not generally suitable for use.

There is logic in build.gradle that sets a HAS_JAVAFX_MODULES flag if the boot JDK has javafx.* modules. In this mode, it necessarily builds using the "--upgrade-module-path" option, so that we can test and run using the newly build JavaFX modules prior to including them in a new JDK. The "--upgrade-module-path" option is incompatible with the "--release" option that was added in JavaFX 20 as a more reliable way to indicate the minimum JDK version that we are targeting.

In addition to any fix we might make to allow the "HAS_JAVAFX_MODULES" mode to work, we might want to print a clear warning that we are using this mode, and won't produce a standalone SDK.
Comments
A likely solution will be to use "--source" and "--target" instead of "--release" when HAS_JAVAFX_MODULES is true.
19-01-2023