title: Run shell script from java
body: <p>I have <code>sendmail</code> file that contains this script <code>echo "sample message" | /usr/bin/swaks --to email@gmail.com</code> I want to run it from java using this code :</p>
  
  <pre><code>ProcessBuilder pb = new ProcessBuilder("sendmail");
  Process p = pb.start()
  </code></pre>
  
  <p>but the email is not sent. Whats wrong and how can i fix this?</p>
  
  <p>edit : running <code>./sendmail</code> is working, and the email is sent to my mail </p>