on the box ubuntu was installed headless, but x server was added later on.
Swing works correctly on that box, but JavaFX fails with next exception:
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:379)
at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:28)
at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:98)
at java.lang.Thread.run(Thread.java:636)
Caused by: java.lang.NullPointerException
at com.sun.glass.ui.gtk.GtkWindow.syncWithXServer(Native Method)
at com.sun.glass.ui.gtk.GtkWindow._setVisible(GtkWindow.java:122)
at com.sun.glass.ui.Window.setVisible(Window.java:371)
at com.sun.javafx.tk.quantum.WindowStage.setVisible(WindowStage.java:346)
at javafx.stage.Window$13.invalidated(Window.java:704)
at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:88)
at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:122)
at javafx.stage.Window.setShowing(Window.java:744)
at javafx.stage.Window.show(Window.java:759)
at javafx.stage.Stage.show(Stage.java:129)
at dofx.start(dofx.java:11)
at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:299)
at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:153)
at com.sun.javafx.application.PlatformImpl$3.run(PlatformImpl.java:120)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication$1$1.run(GtkApplication.java:36)
... 1 more