This commit is contained in:
Anuken
2020-08-26 09:21:18 -04:00
parent 1461673168
commit be74e954fa
4 changed files with 9 additions and 4 deletions

View File

@@ -97,7 +97,10 @@ public class BeControl{
BaseDialog dialog = new BaseDialog("@be.updating");
download(updateUrl, file, i -> length[0] = i, v -> progress[0] = v, () -> cancel[0], () -> {
try{
Runtime.getRuntime().exec(new String[]{"java", "-DlastBuild=" + Version.build, "-Dberestart", "-jar", file.absolutePath()});
Runtime.getRuntime().exec(OS.isMac ?
new String[]{"java", "-XstartOnFirstThread", "-DlastBuild=" + Version.build, "-Dberestart", "-jar", file.absolutePath()} :
new String[]{"java", "-DlastBuild=" + Version.build, "-Dberestart", "-jar", file.absolutePath()}
);
System.exit(0);
}catch(IOException e){
ui.showException(e);