I'm relatively new (about 1 month) to JavaFX, and even newer to Gradle. My project is here, on Github. When I run ./gradlew build, it works fine. But, when I run ./gradlew run , I get all this:
Alins-MacBook-Pro:evisu Alin$ ./gradlew run :compileJava UP-TO-DATE :processResources UP-TO-DATE :cssToBin SKIPPED :classes UP-TO-DATE :run 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:497) 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:497) 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$152(LauncherImpl.java:182) at com.sun.javafx.application.LauncherImpl$$Lambda$51/1323468230.run(Unknown Source) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException: inputStream is null. at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2459) at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2429) at ro.badilos.evisu.EviSU.loadMainPane(EviSU.java:43) at ro.badilos.evisu.EviSU.start(EviSU.java:27) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$159(LauncherImpl.java:863) at com.sun.javafx.application.LauncherImpl$$Lambda$54/2140593657.run(Unknown Source) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$172(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl$$Lambda$47/186276003.run(Unknown Source) at com.sun.javafx.application.PlatformImpl.lambda$null$170(PlatformImpl.java:295) at com.sun.javafx.application.PlatformImpl$$Lambda$49/1714838540.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(PlatformImpl.java:294) at com.sun.javafx.application.PlatformImpl$$Lambda$48/237061348.run(Unknown Source) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) Exception running application ro.badilos.evisu.EviSU :run FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':run'. > Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1 * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 3.74 secs What am I doing wrong?
Is this the base of all the problems?
Caused by: java.lang.NullPointerException: inputStream is null. at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2459) at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2429) at ro.badilos.evisu.EviSU.loadMainPane(EviSU.java:43) at ro.badilos.evisu.EviSU.start(EviSU.java:27) What would be the correct path to the .fxml files?
Thank you!