I'm setting up a JavaFX project with Maven for the first time, and followed the steps exactly as on openjfx's website. All I have done so far is replace the default FXML files with my own, yet I keep getting this error.
What's strange, however, is that my FXML files still load. My project runs, but I still get the warning. I've never seen this error before on my last project, which didn't use Maven.
Here is my relevant code:
public class App extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) throws Exception{
Parent root =
FXMLLoader.load(getClass().getResource(
"proj2.fxml"));
stage.setTitle("proj2");
stage.setScene(new Scene(root, 500, 500));
stage.show();
}
}
My module-info folder:
module org.proj2 {
requires javafx.controls;
requires javafx.fxml;
opens org.proj2 to javafx.fxml;
exports org.proj2;
}
And everything else was from a standard, modular Maven project setup, or at least what was described on openjfx's site. And my FXML files are in the resources folder as given in the setup.
Should I just ignore the warning? How can I get rid of it? I'm aware I don't have much information to go off of so I'll include any other files in my post if necessary.