I am a fairly new java programmer. I only have about five weeks of experience, starting from zero, and I am having problems getting javafx fxml files created in Scene Builde
I was having the same problem. Looked inside my Jar (with Winzip) and see that the FXML file isn't there. Turns out my ANT script building the jar files was only including the *.class files from the bin directory of my project.
Both exceptions say "the (FXML) file you are trying to load cannot be found in the location you have provided". Your filename is wrong or its path. Give your package structure or at least the path of class file that includes load(String pFileName, Stage pStage, String pTitle)
method and the path of FXML file you want to load. Read the javadoc API of getResource()
and examine sample codes about it on the net.
It's a path issue, java needs to know where to get the file from the package hierarchy.
So using "/package1/resourcename.fxml"
should find the source from the root of the tree.
You normally leave off the "/"
at the start as you are already at the top of the package tree.