JDK-8169500 : Cannot build JavaFX with OpenJDK due to dependency on jdk.jfr
  • Type: Bug
  • Component: javafx
  • Sub-Component: build
  • Affected Version: 9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-11-09
  • Updated: 2016-11-09
  • Resolved: 2016-11-09
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
9Fixed
Related Reports
Relates :  
Relates :  
Description
After the fix for JDK-8161704, we can no longer build JavaFX with OpenJDK due to leftover dependency on jdk.jfr.

The build logic that depends on jfr is currently disabled in build.gradle, but the module-info.java of javafx.base has a "requires jdk.jfr" statement. This should be removed. As a note, JDK-8088418 is a follow-on RFE to switch to the new API, and when/if that is done it will need to be done such that the dependency is optional.
Comments
A fundamental part of being able to compile javafx modules with the latest JDK is to include module-info.java when compiling.
09-11-2016

Hmm, I wonder wouldn't excluding module-info.java from sourceSet fix that? And also that warning during testing?
09-11-2016

We now actually compile module-info.java when we build FX, so the absence of jdk.jfr causes a compilation error.
09-11-2016

There was some logic in the build.gradle along the lines 3816 which was supposed to deal with this. I wonder why it doesn't work anymore?
09-11-2016

Changeset: c71d9f8df745 Author: kcr Date: 2016-11-09 05:34 -0800 URL: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/c71d9f8df745 8169500: Cannot build JavaFX with OpenJDK due to dependency on jdk.jfr Reviewed-by: ddhill
09-11-2016

+1
09-11-2016

diff --git a/modules/javafx.base/src/main/java/module-info.java b/modules/javafx.base/src/main/java/module-info.java --- a/modules/javafx.base/src/main/java/module-info.java +++ b/modules/javafx.base/src/main/java/module-info.java @@ -25,7 +25,6 @@ module javafx.base { requires java.desktop; - requires jdk.jfr; exports javafx.beans; exports javafx.beans.binding;
09-11-2016