Close main process before starting the update
This commit is contained in:
parent
fc3a6f0520
commit
1af34edc88
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user