title: Process builder returns exit code 127 when running a Kshell script
body: <p>I am trying to run a Kshell script via Java process builder. The script itself works perfectly when run on the server. However, when I run it via process builder I am getting exit code <code>127 - command not found</code>.</p>
  
  <p>Code:</p>
  
  <pre><code>ProcessBuilder procBuilder = new ProcessBuilder(command);
  procBuilder.directory(new File(codeDir));
  proc = procBuilder.start();
  errorCode = proc.waitFor();
  
  return errorCode;
  </code></pre>
  
  <p>My command look like:</p>
  
  <pre><code>[/bin/ksh, -c, myscript.ksh, 20150714]
  </code></pre>
  
  <p>I run the script on the server by itself using following command:</p>
  
  <pre><code>ksh -x myscript.ksh 20150714
  </code></pre>
  
  <p>any idea what is going on wrong here?</p>