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

Support FX javafx.concurrent.Task and FX properties in a headless environment

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 7u15
    • javafx
    • None
    • java version "1.7.0_17"
      Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
      Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)

      Executing a javafx.concurrent.Task in a headless environment throws an exception:

      Caused by: java.lang.IllegalStateException: Toolkit not initialized
      at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:155)
      at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:150)
      at javafx.application.Platform.runLater(Platform.java:52)

       because the properties are calling PlatformImpl.runLater as part of their threading support.

      This situation unnecessarily limits use of JavaFX properties and and libraries based upon them to be used only in a GUI environment. Can we have some type of solution to allow the javafx properties/observables to run in headless environments?

            Unassigned Unassigned
            kcampbelljfx Keith Campbell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Imported: