[FIX] Force exit JVM

This commit is contained in:
Gravita 2023-11-19 14:04:29 +07:00
parent 0482cfa9ab
commit 4720e4d106

View file

@ -203,6 +203,9 @@ public void run(String... args) throws Throwable {
}
}
launch.launch(config.mainclass, config.mainmodule, Arrays.asList(real_args));
if(!config.keepJVMAfterMainMethodCompleted) {
System.exit(0);
}
} catch (Throwable e) {
LogHelper.error(e);
System.exit(-1);
@ -245,6 +248,7 @@ public static final class Config {
public String address;
public String serverName;
public boolean autoloadLibraries;
public boolean keepJVMAfterMainMethodCompleted;
public String logFile;
public List<String> classpath;
public ClientProfile.ClassLoaderConfig classLoaderConfig;