Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8075550

Error "JavaFX runtime not found" in nashorn when load predefines scripts to import JavaFX packages

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Environment:

      jdk 9b55

    • Subcomponent:
    • Resolved In Build:
      b114
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      this simple script:

      load("fx:base.js")

      throw exceptions :

      Exception in Application start method
      Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
      at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
      at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$153(LauncherImpl.java:182)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: fx:base.js:51:8 Error: JavaFX runtime not found
      at jdk.nashorn.internal.objects.NativeError.initException(NativeError.java:135)
      at jdk.nashorn.internal.objects.NativeError.<init>(NativeError.java:101)
      at jdk.nashorn.internal.objects.NativeError.<init>(NativeError.java:105)
      at jdk.nashorn.internal.objects.NativeError.<init>(NativeError.java:109)
      at jdk.nashorn.internal.objects.NativeError.constructor(NativeError.java:128)
      at jdk.nashorn.internal.scripts.Script$Recompilation$14$666$\=fx\!base$cu1$restOf.L:42(fx:base.js:51)
      at jdk.nashorn.internal.scripts.Script$Recompilation$11$\=fx\!base.:program(fx:base.js:42)
      at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:636)
      at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:228)
      at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
      at jdk.nashorn.internal.runtime.Context.evaluateSource(Context.java:1151)
      at jdk.nashorn.internal.runtime.Context.load(Context.java:800)
      at jdk.nashorn.internal.objects.Global.load(Global.java:996)
      at jdk.nashorn.internal.scripts.Script$Recompilation$9$main1.:program(main1.js:3)
      at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:636)
      at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:228)
      at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
      at jdk.nashorn.internal.runtime.Context.evaluateSource(Context.java:1151)
      at jdk.nashorn.internal.runtime.Context.load(Context.java:800)
      at jdk.nashorn.internal.objects.Global.load(Global.java:996)
      at jdk.nashorn.internal.scripts.Script$Recompilation$7$859A$\=fx\!bootstrap$cu1$restOf.start(fx:bootstrap.js:47)
      at javafx.application.Application$$NashornJavaAdapter.start(Unknown Source)
      at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$160(LauncherImpl.java:863)
      at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$173(PlatformImpl.java:326)
      at com.sun.javafx.application.PlatformImpl.lambda$null$171(PlatformImpl.java:295)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.javafx.application.PlatformImpl.lambda$runLater$172(PlatformImpl.java:294)
      at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
      at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
      at com.sun.glass.ui.gtk.GtkApplication.lambda$null$49(GtkApplication.java:139)
      ... 1 more

        Attachments

          Activity

            People

            • Assignee:
              jlaskey Jim Laskey
              Reporter:
              slugovoy Sergey Lugovoy (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: