JavaFX application does not run under IntelliJ Idea

0

I am using the unchanged sample application that IntelliJ IDEA 2016.3.3 generate. When I try to run it it says "Process finished with exit code -1073740791 (0xC0000409)" However, when I run the exact same source code in Eclipse everything goes fine. P.S: I am using the Default Settings in IntelliJ ID.

Main.java:

package sample;

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

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

Sample.fxml

<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.GridPane?>

<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<GridPane fx:controller="sample.Controller"
      xmlns:fx="http://javafx.com/fxml" alignment="center" hgap="10" vgap="10">
</GridPane>

Controller.java

package sample;

public class Controller {
}

UPDATE: I solved this Problem by deactivating my nVidia Card on my Laptop.

java
intellij-idea
javafx
asked on Stack Overflow Jan 27, 2017 by Reda • edited Feb 1, 2017 by Reda

2 Answers

2

This error is usually linked with nVidia graphics drivers every now and then. I can confirm that it is due to 1/24/2017 update. Roll back to December 2016 update for now until they fix this issue.

answered on Stack Overflow Jan 28, 2017 by Zaiter
0

I had the same problem, install the 376.33 driver from Nvidia and it should work again.

answered on Stack Overflow Jan 30, 2017 by Maxpal

User contributions licensed under CC BY-SA 3.0