1

I am trying to run JavaFX project, but I am unable to due to an error. I have walked through multiple tutorials on Youtube, also went step by step guidelines on

https://taylorial.com/cs1021/Install.htm

as well, as on

https://openjfx.io/openjfx-docs/#maven

but all of that proved fruitless. I am using jdk 15.0.1_9 (coretto), but tried also openjdk-15. System variables are set and configuret in IntelliJ Idea

--module-path ${PATH_TO_FX} --add-modules=javafx.controls,javafx.fxml

Also, libraries, plugin and maven dependencies are in place

Here is full error outcome. Could you share your thought, please? I am getting frustrated, as I am struggling with this since yesterday's afternoon.

Main (generic) class:

package AllegroAPI;

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("gui.fxml"));
        primaryStage.setTitle("Hello World");
        primaryStage.setScene(new Scene(root, 300, 275));
        primaryStage.show();
    }


    public static void main(String[] args) {
        launch(args);
    }
}
NewBe
  • 61
  • 1
  • 7

0 Answers0