Let's try this.

This commit is contained in:
ceikry 2021-07-30 14:32:26 -05:00
parent 6d4e3c9dba
commit 6d6bcf62f4

View file

@ -9,5 +9,10 @@ fun Component.placeAt(x: Int, y: Int, width: Int, height: Int){
fun launchClient() { fun launchClient() {
println("Launching client now.") println("Launching client now.")
Runtime.getRuntime().exec("java -jar " + Settings.SAVE_DIR + File.separator + Settings.SAVE_NAME, null, File(System.getProperty("user.home"))).also { exitProcess(0) } var proc = Runtime.getRuntime().exec("java -jar " + Settings.SAVE_NAME, null, File(System.getProperty("user.home")))
if(proc.isAlive){
exitProcess(0)
} else {
MainWindow.loadingLabel.text = "Error starting the client."
}
} }