aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/xyz/brysonsteck/serverfordummies
diff options
context:
space:
mode:
authorBryson Steck <brysonsteck@protonmail.com>2023-05-10 00:06:00 -0600
committerBryson Steck <brysonsteck@protonmail.com>2023-05-10 00:06:00 -0600
commit0522f0aae1bf69f9aa58f4e2de24ab9ada24431c (patch)
tree0efa5cd771e88c839b5a32102ffcb03bed9d48ee /app/src/main/kotlin/xyz/brysonsteck/serverfordummies
parent5b321f0d403996f31b1d101bc24e582d8c0cb631 (diff)
downloadServerCraft-0522f0aae1bf69f9aa58f4e2de24ab9ada24431c.tar
ServerCraft-0522f0aae1bf69f9aa58f4e2de24ab9ada24431c.tar.gz
ServerCraft-0522f0aae1bf69f9aa58f4e2de24ab9ada24431c.tar.bz2
java doesnt need downloading for now, running jar works
Diffstat (limited to 'app/src/main/kotlin/xyz/brysonsteck/serverfordummies')
-rw-r--r--app/src/main/kotlin/xyz/brysonsteck/serverfordummies/PrimaryController.kt9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/PrimaryController.kt b/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/PrimaryController.kt
index 0932a3d..5bc578e 100644
--- a/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/PrimaryController.kt
+++ b/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/PrimaryController.kt
@@ -2,6 +2,7 @@ package xyz.brysonsteck.serverfordummies
import kotlinx.coroutines.*
import kotlinx.coroutines.javafx.JavaFx
+import org.rauschig.jarchivelib.*
import java.io.File
import java.io.IOException
@@ -43,6 +44,7 @@ import javafx.stage.DirectoryChooser
import javafx.stage.Modality
import javafx.stage.Stage
import javafx.event.EventHandler
+
import Download
class PrimaryController {
@@ -164,7 +166,6 @@ class PrimaryController {
GlobalScope.launch(Dispatchers.Default) {
progressBar.isVisible = true
var downloads = mapOf(
- "Java 20" to "https://download.java.net/java/GA/jdk20.0.1/b4887098932d415489976708ad6d1a4b/9/GPL/openjdk-20.0.1_linux-x64_bin.tar.gz",
"BuildTools" to "https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar",
)
downloads.forEach {
@@ -197,7 +198,11 @@ class PrimaryController {
@FXML
private fun onStart() {
-
+ statusBar.text = "The Minecraft Server is now running. Shutdown the server to unlock the settings."
+ @Suppress("OPT_IN_USAGE")
+ GlobalScope.launch(Dispatchers.Default) {
+ val proc = Runtime.getRuntime().exec("java -jar /home/bryson/test/testserver/server.jar");
+ }
}
private fun createDialog(type: String, msg: String, yes: String, no: String) {