Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Running local runner and bot simultaneously
--- 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"
--- 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