title: Run ksh command from java code to run script file
body: <p>I am trying to execute a script file at <em>(location : /home/id/scripts/)</em> from my java code. Below is my java code :</p>
  
  <pre><code>Process process = null;
  scriptfileName = "myScript.sh" ;
  executeCmd = "/home/id/scripts/" +scriptfileName ;  
  process = new ProcessBuilder(executeCmd).start();
  </code></pre>
  
  <p>When I try to run the script using above code, only initial some lines are getting executed like, I placed 2 echo statement, only the first one is getting printed and rest below lines which has update DataBase statements are not executing. Same script file if I am running directly using command - <code>{ksh sctiptfileName}</code>, it successfully executes and updates DB.</p>