This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I'm spawning a .cmd script from within my main java app. Inside that script, it's setting up some values, then trying to spawn another java program. I don't believe that the 2nd java program is executing or returning to the calling script and then the 1st script hangs.
The code to call the initial script....
Process p = Runtime.getRuntime().exec(updateFile);
// Create threads to read the output and error streams. OutputWriter errorWriter= new OutputWriter(p.getErrorStream(), "ERROR"); OutputWriter outputWriter = new OutputWriter(p.getInputStream(), "OUTPUT"); // Start the threads. errorWriter.start(); outputWriter.start();
result = p.waitFor();
This code calls a script that contains a line ...
cd /D %LEADERBOARD_HOME%\server\leaderboard\deploy\Leaderboard.ear