title: Can't execute java program with php exec function
body: <p>I'm trying to execute a java program to sign a pdf file with php exec function but doesn't work:</p>
  
  <pre><code>exec('java -jar PROGRAM.jar -n -t ORIGIN.pdf -o DESTINY.pdf -s CERTIFICATE -p PASSWORD', $output, $return);
  </code></pre>
  
  <p>When I execute it, the $output is an empty array and $return is an int(1), but if I run:</p>
  
  <pre><code>java -jar PROGRAM.jar -n -t ORIGIN.pdf -o DESTINY.pdf -s CERTIFICATE -p PASSWORD
  </code></pre>
  
  <p>In command line it works. Can anyone help me?</p>
  
  <p>Thank you.</p>