I\'ve tried numerous methods now, including FilenameUtils.normalize() from commons IO, but I can\'t seem to be able to get a resource in another folder to get a Java FXML fi
You can get resources relative to the Class
or the context root. In your example putting /
at the start of the string if thats your package structure in your application. Try
getClass().getResource("/gui/dialogues/plugins/PluginSelection.fxml")
It seems to me that if we use .getResource only when searching in marked as resource folder. Otherwise, even if folder path is correct, but it's not marked as resource folder we'll got an error. So, I do this way:
FileInputStream fileInputStream = new FileInputStream(new File("src/main/java/CRUD/bnkseekCRUD.fxml"));
Parent root = loader.load(fileInputStream);