Problem Running RoboRunner
From Talk:RoboJogger
Jump to navigation
Jump to search
Revision as of 5 December 2012 at 18:31.
This is the thread's initial revision.
This is the thread's initial revision.
I'm finally at the point where I am trying to actually launch RoboRunner. Currently running into an error I will have to debug. Posting part of the stack trace here in case anyone wants to comment.
Copying missing bots... 0 JAR copies done! Initializing engine: robocodes\z1... Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at robowiki.runner.BattleRunner.initEngine(BattleRunner.java:66) at robowiki.runner.BattleRunner.<init>(BattleRunner.java:42) at robowiki.runner.RoboRunner.<init>(RoboRunner.java:172) at org.xandercat.roborunner.runner.RoboRunnerService.startRunner(RoboRunnerService.java:44) at org.xandercat.roborunner.runner.action.LaunchRoboRunnerAction.actionPerformed(LaunchRoboRunnerAction.java:46) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
And the chunk of relevant code from RoboRunner:
System.out.print("Initializing engine: " + enginePath + "... "); ProcessBuilder builder = new ProcessBuilder(command); builder.redirectErrorStream(true); Process battleProcess = builder.start(); BufferedReader reader = new BufferedReader( new InputStreamReader(battleProcess.getInputStream())); String processOutput; do { processOutput = reader.readLine(); } while (!processOutput.equals(BattleProcess.READY_SIGNAL)); System.out.println("done!"); _processQueue.add(battleProcess);
Presumably, the input stream never provided the BattleProcess.READY_SIGNAL. I'll have to do some digging to figure out why. I'm not entirely clear on what the RoboRunner requirements are, but at the moment I am running it under Java 6 with Robocode 1.7.3.0.