So, I'm getting a StackOverflowError (Unwrapped from a InvocationTargetException), and I can't for the life of me figure out why.
package gui;
import errorhandling.ErrorLogBook;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class GUIRouter extends Application{
public static void main(String[] args)
{
try
{
Application.launch(GUIRouter.class, (String[])null);
}
catch (Exception e)
{
System.out.println(e.getCause().toString());
}
}
@Override
public void start (Stage primaryStage)
{
try
{
StackPane page = (StackPane) FXMLLoader.load(GUIRouter.class.getResource("LoginScreen.fxml"));
Scene scene = new Scene(page);
primaryStage.setScene(scene);
primaryStage.show();
}
catch (Exception e)
{
ErrorLogBook.logReport(e);
}
}
It fails at the first try block with:
Application.launch(GUIRouter.class, (String[])null);
This is a FXML application that I'm building with NetBeans and JavaFX Scene Builder 2.0
Any ideas about why my code keeps crashing?