title: shell script exception from java
body: <p>I am trying Spring batch job that run from shell script sh file. The following is my code.
  <strong>I want to catch shell script exception or error from java code.</strong></p>
  
  <pre><code>String file = "script.sh";
  File shellScriptFile= new File(file);
  Runtime run = Runtime.getRuntime();
  ProcessBuilder processBuilder = new ProcessBuilder(shellScriptFile.getAbsolutePath(), "Argument-ONE" , "Argument-TWO");
  Process process = processBuilder.start();
  </code></pre>
  
  <p>Thank you very much.</p>