8075623: Temporary patch to get fx imports working interim
Reviewed-by: lagergren
Contributed-by: james.laskey@oracle.com
--- 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();