Error trying to run scene

1

I made a Scene Builder screen, but when I compile in JavaFX does this error help me?

    ant -f C:\Users\gusta\Desktop\TccProject\LoginJAVAFXML jfxsa-run
init:
Deleting: C:\Users\gusta\Desktop\TccProject\LoginJAVAFXML\build\built-jar.properties
deps-jar:
Updating property file: C:\Users\gusta\Desktop\TccProject\LoginJAVAFXML\build\built-jar.properties
Copying 1 file to C:\Users\gusta\Desktop\TccProject\LoginJAVAFXML\build\classes
compile:
Deleting directory C:\Users\gusta\Desktop\TccProject\LoginJAVAFXML\dist\lib
Copying 1 file to C:\Users\gusta\Desktop\TccProject\LoginJAVAFXML\dist\lib
Detected JavaFX Ant API version 1.3
Launching <fx:jar> task from C:\Program Files\Java\jdk1.8.0_172\jre\..\lib\ant-javafx.jar
Warning: From JDK7u25 the Codebase manifest attribute should be used to restrict JAR repurposing.
         Please set manifest.custom.codebase property to override the current default non-secure value '*'.
Launching <fx:deploy> task from C:\Program Files\Java\jdk1.8.0_172\jre\..\lib\ant-javafx.jar
No base JDK. Package will use system JRE.
No base JDK. Package will use system JRE.
jfx-deployment-script:
jfx-deployment:
jar:
Copying 13 files to C:\Users\gusta\Desktop\TccProject\LoginJAVAFXML\dist\run216776770
jfx-project-run:
Executing C:\Users\gusta\Desktop\TccProject\LoginJAVAFXML\dist\run216776770\LoginJAVAFXML.jar using platform C:\Program Files\Java\jdk1.8.0_172\jre/bin/java
Exception in Application start method
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
    at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
    at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$154(LauncherImpl.java:182)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException: Location is required.
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3207)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3175)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3148)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3124)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3104)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3097)
    at loginjavafxml.LoginJAVAFXML.start(LoginJAVAFXML.java:23)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$161(LauncherImpl.java:863)
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326)
    at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(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.lambda$null$147(WinApplication.java:177)
    ... 1 more
Exception running application loginjavafxml.LoginJAVAFXML
Java Result: 1
Deleting directory C:\Users\gusta\Desktop\TccProject\LoginJAVAFXML\dist\run216776770
jfxsa-run:
CONSTRUÍDO COM SUCESSO (tempo total: 5 segundos)
    
asked by anonymous 13.05.2018 / 00:57

1 answer

1

Check in your SceneBuilder if you are referencing your Controller class. Can be edited directly in FXML this way

fx:controller="sample.Controller"
    
13.05.2018 / 01:04