Files
SlimeVR-Server/src/main/java/io/eiren/vr/Main.java
T
2021-09-02 11:33:27 +03:00

48 lines
1.0 KiB
Java

package io.eiren.vr;
import java.io.File;
import io.eiren.gui.VRServerGUI;
import io.eiren.util.logging.LogManager;
public class Main {
public static String VERSION = "0.0.18";
public static VRServer vrServer;
@SuppressWarnings("unused")
public static void main(String[] args) {
System.setProperty("awt.useSystemAAFontSettings", "on");
System.setProperty("swing.aatext", "true");
File dir = new File("").getAbsoluteFile();
try {
LogManager.initialize(new File(dir, "logs/"), dir);
} catch(Exception e1) {
e1.printStackTrace();
}
try {
vrServer = new VRServer();
vrServer.start();
new VRServerGUI(vrServer);
} catch(Throwable e) {
e.printStackTrace();
try {
Thread.sleep(2000L);
} catch(InterruptedException e2) {
e.printStackTrace();
}
System.exit(1); // Exit in case error happened on init and window not appeared, but some thread started
} finally {
try {
Thread.sleep(2000L);
} catch(InterruptedException e) {
e.printStackTrace();
}
}
}
}