Код: Выделить всё
public void start(Stage stage) throws IOException {
try {
// System.out.println(getClass());
URL url = this.getClass().getResource("/org/example/ooplibrary/View/LogInView.fxml");
if (url == null) {
throw new IOException("FXML file not found");
}
Parent root = FXMLLoader.load(url);
Scene scene = new Scene(root);
stage.setScene(scene);
stage.show();
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
Код: Выделить всё
org/
example/
ooplibrary/
Core/
Main.java
View/
LogInView.fxml
Подробнее здесь: https://stackoverflow.com/questions/790 ... etresource
Мобильная версия