Just finished creating a basic UI on SceneBuilder and saved the FXML onto Java, but now whenever I launch the application [HelloApplication] it gives an error about fxml location not being set
Is this due to an incorrect resource directory or name?
HelloApplication code:
package com.example.oneschoolmanager_tst.Testers;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.stage.Stage;
import java.io.IOException;
public class HelloApplication extends Application {
@Override
public void start(Stage stage) throws IOException {
FXMLLoader fxmlLoader = new FXMLLoader(HelloApplication.class.getResource("main-view.fxml"));
Scene scene = new Scene(fxmlLoader.load());
stage.setTitle("Hello!");
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch();
}
}
When run it gives an IllegalStateException with message Location is not set at line 14.

Yes.
If you load your FXML file with
HelloApplication.class.getResource("main-view.fxml"), your FXML file needs to be in the same (relative) path as classHelloApplication.I.e. your FXML file needs to be in directory
com/example/oneschoolmanager_tst/Testers.