title: Eclipse not running JavaFX application - runs 'java' application
body: <p>Whenever I create a project in Eclipse and include javafx, the application does not load when I click the run button. </p>
  
  <p>e.g.</p>
  
  <pre><code>package test;
  
  import javafx.application.Application;
  import javafx.event.ActionEvent;
  import javafx.event.EventHandler;
  import javafx.scene.Scene;
  import javafx.scene.control.Button;
  import javafx.scene.layout.StackPane;
  import javafx.stage.Stage;
  
  public class test extends Application {
      public static void main(String[] args) {
          launch(args);
      }
  
      @Override
      public void start(Stage primaryStage) {
          primaryStage.setTitle("Hello World!");
          Button btn = new Button();
          btn.setText("Say 'Hello World'");
          btn.setOnAction(new EventHandler&lt;ActionEvent&gt;() {
  
              @Override
              public void handle(ActionEvent event) {
                  System.out.println("Hello World!");
              }
          });
  
          StackPane root = new StackPane();
          root.getChildren().add(btn);
          primaryStage.setScene(new Scene(root, 300, 250));
          primaryStage.show();
      }
  }
  </code></pre>
  
  <p>This should run a simple hello world application, taken from the oracle documentation. However when I 'run' this code, no windows open. Instead an application called 'java' opens. It appears 'java' is simply a 'unix executable file' located in 'jdk1.8.0_25.jdk/contents/home/bin'. The application 'java' displays absolutely nothing, and cannot be shut down without force quitting.</p>
  
  <p>I'm running eclipse on a Macbook. I've probably left out some important details...</p>
  
  <p>Does anyone know why my application is not running as it should? Forgive my naivety, I'm new to java and eclipse. </p>
  
  <p>Many Thanks</p>
  
  <p>EDIT:</p>
  
  <pre><code>import javafx.application.Application;
  import javafx.stage.Stage;
  
  
  public class JavaFX extends Application {
  
      public static void main(String[] args){
              launch(args);
      }
  
      @Override
      public void start(Stage stage) throws Exception {
          // TODO Auto-generated method stub
          stage.show();
  
      }
  
  }
  </code></pre>
  
  <p>This simple program also gives the same error.</p>