Skip to content
This repository has been archived by the owner on Jun 12, 2019. It is now read-only.

Commit

Permalink
Add launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
ehhthing committed May 24, 2019
1 parent 2eb565b commit b2e1e16
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions ThymeLauncher.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import java.lang.ProcessBuilder;

/**
* The launcher allows the starting of the game under a different version of Java.
*/
public class Launcher {
static final String JAR = "game/run.jar";
static final String JRE_DIR = "jre";

/**
* Starts the game under a different version of java.
*
* @param args The arguments
*/
public static void main(String[] args) {
ProcessBuilder game = new ProcessBuilder();
game.inheritIO();
game.command(JRE_DIR + "/bin/java", "-jar", JAR);
game.start();
}
}

0 comments on commit b2e1e16

Please sign in to comment.