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