title: Execute .jar from Python
body: <p>I am trying to build a very simple python script to automate minifying/combining some css/js assets.</p>
  
  <p>I am not sure how to properly handle the minification step. I use yui-compressor and usually call the jar directly from the command line.</p>
  
  <p>Assuming the build script is in the same directory as rhino <code>js.jar</code> and <code>yui-compressor.jar</code>, I'd be able to compress a css/js file like so:</p>
  
  <pre><code>java -cp js.jar -jar yuicompressor-2.4.4.jar -o css/foo.min.css css/foo.css
  </code></pre>
  
  <p>Calling that from the terminal works fine, but in the python build file, it does not
  eg, <code>os.system("...")</code>
  The exit status being returned is <code>0</code>, and no output is being returned from the command (for example, when using <code>os.popen()</code> instead of <code>os.system()</code>)</p>
  
  <p>I'm guessing it has something to do with paths, perhaps with java not resolving properly when calling to <code>os.system()</code>… any ideas?</p>
  
  <p>Thanks for any help</p>