Close main process before starting the update

This commit is contained in:
Steven Tracey 2022-04-10 23:18:40 -04:00
parent fc3a6f0520
commit 1af34edc88

View File

@ -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) {