Created
October 31, 2012 02:22
-
-
Save Maccimo/3984437 to your computer and use it in GitHub Desktop.
Running local runner and bot simultaneously
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- local-runner.bat;original 2012-10-01 10:51:08.000000000 +0400 | |
+++ local-runner.bat 2012-10-31 03:48:03.265953800 +0400 | |
@@ -1 +1 @@ | |
-start javaw -cp ".;*;%~dp0/*" -jar "local-runner.jar" | |
+@start javaw -jar "%~dp0\local-runner.jar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Runner.java;original 2012-10-31 06:10:12.658807200 +0400 | |
+++ Runner.java 2012-10-31 02:12:01.058374400 +0400 | |
@@ -7,11 +7,13 @@ | |
public final class Runner { | |
private final RemoteProcessClient remoteProcessClient; | |
private final String token; | |
- public static void main(String[] args) throws IOException { | |
+ public static void main(String[] args) throws IOException, InterruptedException { | |
+ Runtime.getRuntime().exec("cmd /c x:\\path\\to\\LocalRunner\\local-runner.bat"); | |
+ Thread.sleep(1000); // Wait until runner started | |
if (args.length == 3) { | |
new Runner(args).run(); | |
} else { | |
new Runner(new String[]{"localhost", "31000", "0000000000000000"}).run(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment