title: Running command for Linux from Java runtime
body: <p>Can anyone help me how to run a gpg encryption command from a java program using Runtime.getRuntime().exec()?</p>
  
  <p>sample command which I wanted to run shown below:</p>
  
  <p><strong><em>gpg -u 'receipient' -r KeyID --armor --output /home/myuser/tmp/check.pgp --sign --passphrase '</em>&amp;sw@217' --batch --encrypt /home/myuser/tmp/check.txt*</strong></p>
  
  <p>When I try to execute this from my Java program it gives error like "usage: gpg [options] [filename]"</p>
  
  <p>Please help on resolving this error and run the above gpg command from a java program.</p>