Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Exception in Application start method - Location is not set

User_TJDP4Apr 15 2021

Firstly, I've looked everywhere and tried different options but none of them worked for me. But yeah, I am just starting out with JavaFX (I'm using javafx-sdk-11.0.2), and I am trying to build a simple application for object detection. I am getting the following error on my console:
a1.png
As I can understand the FXMLLoader can't find the .fxml files. I've search around, and tried different locations also tried to add and delete the '/'s, but no luck. Actually I am sure that I've set the location correct, but yeah I don't know what's wrong.
Here's where I am getting the error (MainApp.java):
a2.png
I've also tried to add '/' at the start like: ("/view/MainView.fxml")); also tried ("/MainView.fxml"));, but couldn't get it to work.
Here are my fxml files located:
a3.png
What am I doing wrong? How can I fix this?

Comments
Post Details
Added on Apr 15 2021
0 comments
1,010 views