title: How to run a .sh file from Java?
body: <p>I need to run a .sh file from my Java code with out passing any arguments. I already tried doing it with</p>
  
  <pre><code>Runtime.getRuntime().exec("src/lexparser.sh");
  </code></pre>
  
  <p>and</p>
  
  <pre><code>ProcessBuilder pb = new ProcessBuilder("src/lexparser.sh");
  Process p = pb.start();
  </code></pre>
  
  <p>Both of the above methods didn't work. Is there any other method to run a .sh file form Java?</p>