Exception in Application start method
Не собирается программа, поиски в интернете ни к чему не привели.
//Main
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception{
Parent root = FXMLLoader.load(getClass().getResource("Views/sample.fxml"));
primaryStage.setTitle("Hello World");
primaryStage.setScene(new Scene(root, 1000, 600));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
//Sample.fxml
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Text?>
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="Controllers.sampleController">
<children>
<HBox prefHeight="40.0" prefWidth="600.0">
<children>
<Button fx:id="addButton" mnemonicParsing="false" prefHeight="40.0" prefWidth="108.0" text="Добавить" />
<Button fx:id="DeleteButton" mnemonicParsing="false" prefHeight="40.0" prefWidth="115.0" text="Удалить" />
<Button fx:id="editButton" mnemonicParsing="false" prefHeight="40.0" prefWidth="133.0" text="Редактировать" />
</children>
</HBox>
<VBox layoutY="40.0" prefHeight="360.0" prefWidth="600.0">
<children>
<Text fx:id="textField" strokeType="OUTSIDE" strokeWidth="0.0" text="Text" wrappingWidth="599.13671875" />
</children>
</VBox>
</children>
</AnchorPane>

