I'm trying to run two bat files from a Java app. I'm using:
try
{
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec(fullCommand);
InputStream stderr = proc.getErrorStream();
InputStreamReader isr = new InputStreamReader(stderr);
BufferedReader br = new BufferedReader(isr);
int exitVal = proc.waitFor();
System.out.println("Process exitValue: " + exitVal);
System.out.println("Working...");
} //End try
catch (Throwable t)
{
t.printStackTrace();
} //End catch
} //End method
The bat file calls another bat file. It never seems to exit and return control to the original bat file.
From 1.bat
set zzname=%1
zzlookup.bat %zzname%
The other bat file runs a few commands and then should exit. Do I need to do something special with the runtime part?
Thanks in advance, Dustin