title: How to run bash script from Java
body: <p>I've seen many similar posts but I am still stumped.  I want to run this shell script with a Java program :</p>
  
  <pre><code>C:\\Users\\pro-services\\Desktop\\projects\\github\\cygwin\\TEST.sh
  </code></pre>
  
  <p>Here's what the code looks like:</p>
  
  <pre><code>ProcessBuilder pb = new ProcessBuilder("C:\\Users\\pro-services\\Desktop\\projects\\github\\cygwin\\TEST.sh");
  Process p = pb.start();
  </code></pre>
  
  <p>I am trying to use <code>Process Builder</code> but I'm not sure how to get it to work - I keep getting the error:</p>
  
  <pre><code>Cannot run program "C:\Users\pro-services\Desktop\projects\github\cygwin\TEST.sh": CreateProcess error=193, %1 is not a valid Win32 application
  </code></pre>
  
  <p>I know there are other fields of <code>ProcessBuilder</code> that I'm not using.  I also know that there may be syntax issues here.  I wrote my script for Cygwin.  Any help please?</p>