Javafx macos Mojave

Asked

Viewed 29 times

0

Good morning,

I’m having a hard time with Javafx. I installed E(fx)clipse version 3.4.1

public class Main extends Application {

    @Override
    public void start(Stage primaryStage) {
        primaryStage.setTitle("Hello World!");
        Button btn = new Button();
        btn.setText("Say 'Hello World'");
        btn.setOnAction(new EventHandler<ActionEvent>() {

            @Override
            public void handle(ActionEvent event) {
                System.out.println("Hello World!");
            }
        });
    }

    public static void main(String[] args) {
        launch(args);
    }
}

The application runs without errors. However the window does not appear. Only the icon appears in the dock. inserir a descrição da imagem aqui

  • Try running with Java 8. Unless mistakenly e(fx)clipse is not yet compatible with java 9+

1 answer

0

Problem solved. Even using java 11. Just take a check below the arguments.

According to the attached image.

inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.