Skip to content

Instantly share code, notes, and snippets.

@Maccimo
Created October 31, 2012 02:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Maccimo/3984437 to your computer and use it in GitHub Desktop.
Save Maccimo/3984437 to your computer and use it in GitHub Desktop.
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