Besseres installieren der Bibliotheken

This commit is contained in:
Simon Rieger 2016-10-17 10:33:17 +02:00
parent 12f14b5dee
commit da0daef4c0
7 changed files with 4 additions and 28 deletions

0
forge.jar.log Normal file
View file

Binary file not shown.

BIN
modpack/Minecraft.jar Normal file

Binary file not shown.

Binary file not shown.

BIN
modpack/modpack/forge.jar Normal file

Binary file not shown.

View file

@ -9,7 +9,6 @@ package forgemodpackbuilder;
* *
* @author simonr * @author simonr
*/ */
import java.io.*;
public class ProcExecExamples { public class ProcExecExamples {
@ -17,34 +16,11 @@ public class ProcExecExamples {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
if (isWindowsSystem()) {
System.out.println("Windows");
if (funktion == 1) { if (funktion == 1) {
Runtime.getRuntime().exec("cmd /c C:\\Users\\" + System.getProperty("user.home") + "\\AppData\\Roaming\\.minecraft\\Minecraft.jar"); Runtime.getRuntime().exec("java -jar ./modpack/Minecraft.jar");
} }
if (funktion == 2) { if (funktion == 2) {
Runtime.getRuntime().exec("cmd /c C:\\Users\\" + System.getProperty("user.home") + "\\AppData\\Roaming\\.minecraft\\forge.jar"); Runtime.getRuntime().exec("java -jar ./modpack/modpack/forge.jar");
} }
} }
if (isLinuxSystem()) {
System.out.println("Linux");
if (funktion == 1) {
Runtime.getRuntime().exec("java -jar " + System.getProperty("user.home") + "/.minecraft/Minecraft.jar");
}
if (funktion == 2) {
Runtime.getRuntime().exec("java -jar " + System.getProperty("user.home") + "/.minecraft/forge.jar");
}
}
}
static boolean isWindowsSystem() {
String osName = System.getProperty("os.name").toLowerCase();
return osName.indexOf("windows") >= 0;
}
static boolean isLinuxSystem() {
String osName = System.getProperty("os.name").toLowerCase();
return osName.indexOf("linux") >= 0;
}
} }