diff --git a/src/main/kotlin/Globals.kt b/src/main/kotlin/Globals.kt index 2f142a6..0199ad3 100644 --- a/src/main/kotlin/Globals.kt +++ b/src/main/kotlin/Globals.kt @@ -9,5 +9,10 @@ fun Component.placeAt(x: Int, y: Int, width: Int, height: Int){ fun launchClient() { 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." + } } \ No newline at end of file