ACTION - JavaFX modular build is here

David Hill David.Hill at Oracle.com
Wed Nov 9 13:46:58 UTC 2016


On 11/9/16, 4:30 AM, Laurent Bourgès wrote:
> Any workaround ?
>
> PS: as you recommended me for Marlin JavaFX, I am trying adding a dependencies on modules:
> openjfx9/dependencies/java.base/module-info.java.extra:
> 27d26
> < exports jdk.internal.ref to javafx.graphics;
>
> What is the magic to make cross-references between OpenJDK / OpenJFX builds ?

I think this should work. Note that the real fix is to get the second part into a JDK, at which point the workaround part goes away.

diff --git a/build.gradle b/build.gradle
--- a/build.gradle
+++ b/build.gradle
@@ -1678,6 +1678,16 @@
      }
      classes.dependsOn(compileFullJava)

+
+    //Temporary workaround until this is part of the java.base module
+    compileJava.options.compilerArgs.addAll([
+            "--add-exports=java.base/jdk.internal.ref=javafx.graphics",
+            ])
+    compileFullJava.options.compilerArgs.addAll([
+            "--add-exports=java.base/jdk.internal.ref=javafx.graphics",
+            ])
+    //End workaround
+
      // Create a single "native" task which will depend on all the individual native tasks for graphics
      project.ext.nativeAllTask = task("native", group: "Build", description: "Compiles and Builds all native libraries for Graphics");
      project.ext.cleanNativeAllTask = task("cleanNative", group: "Build", description: "Clean all native libraries and objects for Graphics");
diff --git a/dependencies/java.base/module-info.java.extra b/dependencies/java.base/module-info.java.extra
--- a/dependencies/java.base/module-info.java.extra
+++ b/dependencies/java.base/module-info.java.extra
@@ -24,6 +24,7 @@
   */

  exports jdk.internal.misc to javafx.graphics;
+exports jdk.internal.ref to javafx.graphics;
  exports jdk.internal.ref to javafx.media;
  exports sun.net.www to javafx.web;
  exports sun.nio.ch to javafx.media;


-- 
David Hill<David.Hill at Oracle.com>
Java Embedded Development

"A man's feet should be planted in his country, but his eyes should survey the world."
-- George Santayana (1863 - 1952)



More information about the openjfx-dev mailing list