java – JavaFX Window not opening

if i run the Main Class my JavaFX is not opening. A Java symbol appears in my menubar but no window appears. I don’t get any error in the console. I am on a Mac machine and I am using eclipse, together with e(fx)clipes and Gluon Scene Builder. The code is actually 1 by 1 written down from a tutorial. In the tutorial the run configuration JRE is set to JavaSE-1.8. – however, I tested every available JRE, without any success. What do I need to adjust?

Main Class:

package application;


import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;

public class Main extends Application {
private Stage primaryStage; 

public void start(Stage primaryStage) {
    this.primaryStage = primaryStage; 

public void mainWindow() {
    try {
        FXMLLoader loader = new FXMLLoader(Main.class.getResource("MainWindow.fxml"));  
        AnchorPane pane = loader.load();
        MainWindowController mainWindowController = loader.getController();
        Scene scene = new Scene(pane);
    } catch (IOException e) {
        // TODO Auto-generated catch block

public static void main(String() args) {

Controller class:

package application;

import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;

public class MainWindowController {

public Main main;
@FXML private Label label;
@FXML private TextField field;
@FXML private Button clear;
@FXML private Button changeText;

public void setMain(Main main) {
    // TODO Auto-generated method stub
    this.main = main;

 public void handleChangeText() {
     String text = field.getText();
 public void handleClear() {


FXML file:

<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>

<AnchorPane prefHeight="400.0" prefWidth="500.0" xmlns="" xmlns:fx="" fx:controller="application.MainWindowController">
      <VBox alignment="CENTER" layoutY="83.0" spacing="30.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
            <Label fx:id="label" text="Label">
                  <Font size="24.0" />
            <HBox alignment="CENTER">
                  <TextField fx:id="field" prefWidth="220.0" />
            <HBox alignment="CENTER" spacing="20.0">
                  <Button fx:id="changeText" mnemonicParsing="false" onAction="#handleChangeText" text="Change Text" />
                  <Button fx:id="clear" mnemonicParsing="false" onAction="#handleClear" text="Clear" />