You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 21, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 21, 2021. It is now read-only.
Hi, I have used netbeans instead of eclipse for the project, but I have followed everything mentioned in the tutorial. Yet I get a "Location is not set" error, and here is a printscreen of what I am seeing exactly. Can I know why is the error being caused since I do not really get it and how can it be fixed.
Edited: I have created another package for the utils.Utils but I assume that has nothing to do with it.
that error is typically related to a wrong path declared for the FXMLLoader:
FXMLLoader loader = new FXMLLoader(getClass().getResource("FXHelloCV.fxml"));
Is the FXHelloCV.fxml file still in the same package of FXHelloCV.java? Does it have the same name? Otherwise, you need to change the previous line to match your project...
Hello, I have the same issue, I moved le .fxml file into the same package but still say "Location is not set".
This is my project architecture:
I also cloned the project, but Eclipse doesn't find the packages and want me to create a project...
Edit: I resolved it thanks to that post. I put application.css and FXHelloCV.fxml into src/main/resources/, so these files/resources are copied in target/classes/ during compilation. Then in the code you have to add "/" to the file path: FXMLLoader loader = new FXMLLoader(getClass().getResource("/FXHelloCV.fxml"));.
Activity
luigidr commentedon Apr 23, 2019
Hi @AhmedAGH,
that error is typically related to a wrong path declared for the
FXMLLoader:FXMLLoader loader = new FXMLLoader(getClass().getResource("FXHelloCV.fxml"));Is the
FXHelloCV.fxmlfile still in the same package ofFXHelloCV.java? Does it have the same name? Otherwise, you need to change the previous line to match your project...rafutek commentedon Jun 21, 2019
Hello, I have the same issue, I moved le .fxml file into the same package but still say "Location is not set".
This is my project architecture:

I also cloned the project, but Eclipse doesn't find the packages and want me to create a project...
Edit: I resolved it thanks to that post. I put application.css and FXHelloCV.fxml into src/main/resources/, so these files/resources are copied in target/classes/ during compilation. Then in the code you have to add "/" to the file path:
FXMLLoader loader = new FXMLLoader(getClass().getResource("/FXHelloCV.fxml"));.