Oracle Java stored procedure call dos batch
Oracle Java stored procedure to run a dos batch file using Java ProcessBuilder. The dos batch output wont return or captured. Code:
ProcessBuilder builder = new ProcessBuilder(batchFile);
builder.redirectErrorStream(true);
Process proc = builder.start();
BufferedReader stdInput = new BufferedReader(new InputStreamReader(proc.getInputStream()));
FileLog.log("====== Batch file std output started at " + dateString);
while ((tmpStr = stdInput.readLine()) != null) {
FileLog.log(tmpStr);
}
Running the java code outside database, everything works just fine, but called thru sqlplus, the standout and error output won't log into the file.
Please help. Anyone had the same issue?
Thanks