ant -f C:\\Users\\Lu\\Documents\\NetBeansProjects\\JavaFXApplication9 -Dnb.internal.action.name=test -Dignore.failing.tests=true test init: Deleting: C:\Users\Lu\Documents\NetBeansProjects\JavaFXApplication9\build\built-jar.properties deps-jar: Updating property file: C:\Users\Lu\Documents\NetBeansProjects\JavaFXApplication9\build\built-jar.properties compile: compile-test: Testsuite: javafxapplication9.JavaFXApplication9Test start main Exception in Application start method Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.228 sec ------------- Standard Output --------------- start main ------------- ---------------- --------------- ------------- Standard Error ----------------- Exception in Application start method ------------- ---------------- --------------- Testcase: testStart(javafxapplication9.JavaFXApplication9Test): Caused an ERROR null java.lang.ExceptionInInitializerError at javafxapplication9.JavaFXApplication9.start(JavaFXApplication9.java:25) at javafxapplication9.JavaFXApplication9Test.testStart(JavaFXApplication9Test.java:50) Caused by: java.lang.IllegalStateException: Toolkit not initialized at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:272) at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:267) at com.sun.javafx.application.PlatformImpl.setPlatformUserAgentStylesheet(PlatformImpl.java:609) at com.sun.javafx.application.PlatformImpl.setDefaultPlatformUserAgentStylesheet(PlatformImpl.java:571) at javafx.scene.control.Control.(Control.java:81) Testcase: testMain(javafxapplication9.JavaFXApplication9Test): Caused an ERROR Exception in Application start method java.lang.RuntimeException: Exception in Application start method at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:894) at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:56) at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:158) at java.lang.Thread.run(Thread.java:744) Caused by: java.lang.NoClassDefFoundError: Could not initialize class javafx.scene.control.Button at javafxapplication9.JavaFXApplication9.start(JavaFXApplication9.java:25) at com.sun.javafx.application.LauncherImpl$8.run(LauncherImpl.java:837) at com.sun.javafx.application.PlatformImpl$7.run(PlatformImpl.java:331) at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:297) at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:294) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl$6.run(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39) at com.sun.glass.ui.win.WinApplication$4$1.run(WinApplication.java:112) Test javafxapplication9.JavaFXApplication9Test FAILED test-report: test: BUILD SUCCESSFUL (total time: 1 second)