title: JavaFX NullPointerException on Startup
body: <p>I'm trying to run a very simple JavaFX program using the Oracle JVM (1.7u13) on Linux (I have the correct version of GTK) running from Eclipse or the command line. As it starts it throws an exception moaning about fonts.  Font.getDefault() can also cause the same NPE.  I can list the available fonts using Font.getFontNames() and I can see 17 including 'System Regular' which I thought was the default.</p>
  
  <p>Any ideas much appreciated!</p>
  
  <p>The stack trace....</p>
  
  <pre>
      Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
          at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:403)
          at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:47)
          at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115)
          at java.lang.Thread.run(Thread.java:722)
      Caused by: java.lang.NullPointerException
          at com.sun.t2k.LogicalFont.(LogicalFont.java:172)
          at com.sun.t2k.LogicalFont.getLogicalFont(LogicalFont.java:104)
          at com.sun.t2k.LogicalFont.getLogicalFont(LogicalFont.java:144)
          at com.sun.t2k.T2KFontFactory.createFont(T2KFontFactory.java:356)
          at com.sun.prism.j2d.J2DFontFactory.createFont(J2DFontFactory.java:38)
          at com.sun.javafx.font.PrismFontLoader.loadFont(PrismFontLoader.java:399)
          at javafx.scene.text.Font.(Font.java:282)
          at javafx.scene.text.Font.getDefault(Font.java:85)
          at com.me.FXProblem.start(FXProblem.java:23)
          at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
          at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:215)
          at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
          at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:176)
          at java.security.AccessController.doPrivileged(Native Method)
          at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:176)
          at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
          at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
          at com.sun.glass.ui.gtk.GtkApplication$3$1.run(GtkApplication.java:82)
          ... 1 more
  </pre>
  
  <h2>Update</h2>
  
  <p>Sample code to get the error.  I'm assuming that the route cause of the Font.getDefault() is what is causing a couple of very simple UI nodes to not display.</p>
  
  <pre><code>
      package com.me;
  
      import javafx.application.Application;
      import javafx.scene.text.Font;
      import javafx.stage.Stage;
  
      /**
       * Problem class to show the stack trace from Font.getDefault()
       */
      public class FXProblem extends Application
      {
          /**
           * {@inheritDoc}
           */
          @Override
          public void start(final Stage stage) throws Exception
          {
              Font.getDefault();
          }
  
          /**
           * Main.
           */
          public static void main(final String[] args)
          {
              launch();
          }
      }
      </code>
  </pre>