package com.mediacitizens.jmcapp.desktop.windows.presentation; import java.io.File; import java.io.PrintStream; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.TextArea; import javafx.scene.control.TextAreaBuilder; import javafx.stage.DirectoryChooser; import javafx.stage.Stage; public class Main extends Application { @Override public void start(Stage primaryStage) { TextArea ta = TextAreaBuilder.create().prefWidth(800).prefHeight(600).wrapText(true).build(); Console console = new Console(ta); PrintStream ps = new PrintStream(console, true); System.setOut(ps); System.setErr(ps); Scene app = new Scene(ta); primaryStage.setScene(app); primaryStage.show(); // ask for installation folder DirectoryChooser installPathChooser = new DirectoryChooser(); installPathChooser.setTitle("Select installation path"); File installPath = installPathChooser.showDialog(primaryStage); if (installPath == null) { System.exit(0); } CoreTest t = new CoreTest(installPath); try { t.perform(); } catch (Exception e) { e.printStackTrace(); } ps.close(); } public static void main(String[] args) { launch(args); } }