fxmlloader getresource from another package

Java
Parent root = FXMLLoader.load(getClass().getResource("/YourPackage/YourFile.fxml"));
Source

Also in Java: