see http://javafx-jira.kenai.com/browse/RT-18489
next applications throws NPE.
import javafx.application.*;
import javafx.stage.*;
import javafx.scene.text.*;
import javafx.scene.*;
public class dofx extends Application {
public static void main(String[] args) { launch(); }
public void start(Stage stage) throws Exception {
stage.setTitle("test");
stage.setScene(new Scene(new Group(new Text(25,25,"text"))));
stage.show();
} }
---------------------------------
$ java -cp javafx-sdk2.1.0-beta/rt/lib/jfxrt.jar:. dofx
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.t2k.LogicalFont.getDefaultAAMode(LogicalFont.java:300)
at com.sun.t2k.LogicalFont.getStrike(LogicalFont.java:304)
at com.sun.t2k.T2KFont.getStrike(T2KFont.java:70)
at com.sun.javafx.font.PrismFontUtils.getFontMetrics(PrismFontUtils.java:14)
at com.sun.javafx.font.PrismFontLoader.getFontMetrics(PrismFontLoader.java:434)
at javafx.scene.text.Text.<init>(Text.java:105)
at javafx.scene.text.Text.<init>(Text.java:113)
at javafx.scene.text.Text.<init>(Text.java:125)
at dofx.start(dofx.java:13)
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
next applications throws NPE.
import javafx.application.*;
import javafx.stage.*;
import javafx.scene.text.*;
import javafx.scene.*;
public class dofx extends Application {
public static void main(String[] args) { launch(); }
public void start(Stage stage) throws Exception {
stage.setTitle("test");
stage.setScene(new Scene(new Group(new Text(25,25,"text"))));
stage.show();
} }
---------------------------------
$ java -cp javafx-sdk2.1.0-beta/rt/lib/jfxrt.jar:. dofx
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.t2k.LogicalFont.getDefaultAAMode(LogicalFont.java:300)
at com.sun.t2k.LogicalFont.getStrike(LogicalFont.java:304)
at com.sun.t2k.T2KFont.getStrike(T2KFont.java:70)
at com.sun.javafx.font.PrismFontUtils.getFontMetrics(PrismFontUtils.java:14)
at com.sun.javafx.font.PrismFontLoader.getFontMetrics(PrismFontLoader.java:434)
at javafx.scene.text.Text.<init>(Text.java:105)
at javafx.scene.text.Text.<init>(Text.java:113)
at javafx.scene.text.Text.<init>(Text.java:125)
at dofx.start(dofx.java:13)
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
- relates to
-
JDK-8127121 Gtk: FX doesn't start on Linux when a Stage is shown without a Scene
- Resolved
-
JDK-8101240 Implement Linux system font lookup using libfontconfig
- Closed