From 1af34edc88d578d618f4815a81a1033b55a1f795 Mon Sep 17 00:00:00 2001 From: Steven Tracey Date: Sun, 10 Apr 2022 23:18:40 -0400 Subject: [PATCH] Close main process before starting the update --- src/main/java/tech/nevets/jaml/AutoUpdater.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/tech/nevets/jaml/AutoUpdater.java b/src/main/java/tech/nevets/jaml/AutoUpdater.java index 15c9ba9..883b95b 100644 --- a/src/main/java/tech/nevets/jaml/AutoUpdater.java +++ b/src/main/java/tech/nevets/jaml/AutoUpdater.java @@ -2,7 +2,6 @@ package tech.nevets.jaml; import com.google.gson.Gson; import com.google.gson.JsonElement; -import tech.nevets.jaml.gui.StartupGui; import tech.nevets.jaml.util.HttpUtils; import java.io.IOException; @@ -20,6 +19,7 @@ public class AutoUpdater { if (versionJson.getAsJsonObject().get("version").toString().replace("\"", "").equalsIgnoreCase(Config.CONFIG.getString("launcher.version"))) { String command = JAML.path + "\\jre\\bin\\javaw.exe -jar " + JAML.path + "\\JAML-Updater.jar"; Runtime.getRuntime().exec(command); + System.exit(0); } } catch (URISyntaxException | IOException e) {