title: Python: How can I execute a jar file through a python script
body: <p>I have been looking for an answer for how to execute a java jar file through python and after looking at:</p>
  
  <p><a href="https://stackoverflow.com/questions/5532481/execute-jar-from-python">Execute .jar from Python</a></p>
  
  <p><a href="https://stackoverflow.com/questions/299249/how-can-i-get-my-python-version-2-5-script-to-run-a-jar-file-inside-a-folder-in">How can I get my python (version 2.5) script to run a jar file inside a folder instead of from command line?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/1264447/how-to-run-python-egg-files-directly-without-installing-them">How to run Python egg files directly without installing them?</a></p>
  
  <p>I tried to do the following (both my jar and python file are in the same directory):</p>
  
  <pre><code>import os
  
  if __name__ == "__main__":
      os.system("java -jar Blender.jar")
  </code></pre>
  
  <p>and</p>
  
  <pre><code>import subprocess
  
  subprocess.call(['(path)Blender.jar'])
  </code></pre>
  
  <p>Neither have worked. So, I was thinking that I should use Jython instead, but I think there must a be an easier way to execute jar files through python. </p>
  
  <p>Do you have any idea what I may do wrong? Or, is there any other site that I study more about my problem?</p>