diff --git a/G-Earth/src/main/java/gearth/Main.java b/G-Earth/src/main/java/gearth/Main.java index a07c8f2..44a3881 100644 --- a/G-Earth/src/main/java/gearth/Main.java +++ b/G-Earth/src/main/java/gearth/Main.java @@ -39,11 +39,17 @@ public class Main extends Application { System.exit(0); }); - if (!AdminValidator.isAdmin()) { - Alert alert = new Alert(Alert.AlertType.ERROR, "G-Earth needs admin privileges in order to work properly, please restart G-Earth unless you know what you're doing", ButtonType.OK); - alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE); - alert.show(); - } + new Thread(() -> { + if (!AdminValidator.isAdmin()) { + Platform.runLater(() -> { + Alert alert = new Alert(Alert.AlertType.ERROR, "G-Earth needs admin privileges in order to work properly, please restart G-Earth with admin permissions unless you know what you're doing", ButtonType.OK); + alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE); + alert.show(); + }); + + } + }).start(); + } public static String[] args;