public void runSimulation() {
        SwingUtilities.invokeLater(new Runnable() {
            @Override
            public void run() {
                System.out.println("[J] Invoking simulation.");
                int processExitValue = SIMULATOR_INVOCATION_PROBLEM_EXIT_CODE;

                try {
                    verifyBinaryState();

                    Process process = Runtime.getRuntime().exec(getAssembledCommand());
                    BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
                    String line = reader.readLine();

                    while (line != null) {
                        System.out.println(line);
                        line = reader.readLine();
                    }

                    process.waitFor();
                    processExitValue = process.exitValue();
                } catch (IOException | InterruptedException ex) {
                    System.out.println("[J] The process led to an exception: " + ex.getMessage());
                    Dialogs.showErrorPane(mainWindow, "Error", "<html>Could not invoke the Physics Toolbox:<br />" + ex.getMessage() + "</html>");
                }

                System.out.println("[J] Simulation ended with the exit code " + processExitValue + ".");

                if (processExitValue == SIMULATOR_INVOCATION_PROBLEM_EXIT_CODE) {
                    System.out.println("[J] The exit code is associated with "
                            + "SIMULATOR_INVOCATION_PROBLEM_EXIT_CODE. Please "
                            + "check if there is anything wrong with the "
                            + "environment what could have let to an invocation "
                            + "problem of the mariumapp executable.");
                }

                mainWindow.configureGuiForRunningPhase(false);
            }
        });
    }