To get the resource, you need to specify the full (!) Base name. That is, with all packages before.
If the resource file has the same base name as the controller class (which is quite reasonable, as this helps bring everything together), you can do this as follows:
String className = this.getClass().getCanonicalName();
// @formatter:off ResourceBundle languageResource = ResourceBundle.getBundle(className, Locale.GERMAN); // formatter:on Object objPane = FXMLLoader.load(fxmlUrl, languageResource);
I wrote a loader assistant for a private resource that will do the trick, getting the object and locale. Of course, I use the locale built from my settings, not a constant, but I wanted everything to be simple.
For the resource file name: since my class is called MainWindow, the resource file (in the same package) is MainWindow_de.properties (where "de" is part of the language, so I also have MainWndow_en.properties in the package.
An extension is required because this is how the file name is created. Without the extension, the file will not be recognized, which will result in your known exception.
Hope that prevents others from spending hours researching ...
source share