8075623: Temporary patch to get fx imports working interim
authorjlaskey
Mon, 23 Mar 2015 09:04:59 -0300
changeset 29623 df47461beb1d
parent 29559 47544495db2d
child 29624 4fd94b55ead4
8075623: Temporary patch to get fx imports working interim Reviewed-by: lagergren Contributed-by: james.laskey@oracle.com
nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/fx/base.js
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/fx/base.js	Wed Jul 05 20:25:16 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/fx/base.js	Mon Mar 23 09:04:59 2015 -0300
@@ -45,11 +45,19 @@
 
     var SUFFIX_LENGTH    = ".class".length;
 
+    // TODO - temporary patch until fx is moved to module system.
+    // <patch>
+    var jfxrtJar;
     try {
-        var jfxrtJar = new ZipFile(System.getProperty("java.home") + "/lib/ext/jfxrt.jar");
-    } catch (ex) {
-        throw new Error("JavaFX runtime not found");
+        jfxrtJar = new ZipFile(System.getProperty("java.home") + "/lib/jfxrt.jar");
+    } catch (ex1) {
+        try {
+            jfxrtJar = new ZipFile(System.getProperty("java.home") + "/lib/ext/jfxrt.jar");
+        } catch (ex2) {
+            throw new Error("JavaFX runtime not found");
+        }
     }
+    // </patch>
 
     var entries = jfxrtJar.entries();