Let's consider the next project structure for the following examples:
I won't print all the source code here as the exact content is not important for the topic. It's an application that opens the second window loaded from FXML. As always, the source code can be found in the Chapter11 folder on our GitHub.
Before we package anything, we need to compile our files by calling javac. The following CLI commands will compile everything for us:
cd SimpleAppjavac -d build/classes src/chapterEleven/*.javacp src/chapterEleven/SecondStage.fxml build/classes/chapterEleven/
Here, we ask javac to build all the Java files in our ...