I want to execute a .jar file from a python Qt application (I use Python 2.7 and PyQt4). I launch a subprocess.call within a method connect to a pushbutton event:
def pushButtonClickedMethod(self):
callJar= ['java', '-jar', 'file.jar', arg1, arg2]
returnCode = subprocess.call(callJar, stdout=None, stderr=None)
I am running this PyQt application within Eclipse (using PyDev plug-in), over MacOSX El Capitan. The application crashes when executing the subprocess.call and in the eclipse console the returning code is -6. Cannot find what the -6 means. Is this the best way to execute a .jar file from a PyQt application? Any hints on what can be wrong?
The .jar file is a runnable .jar, created from the same Eclipse. And it is working as expected when I run it on the Terminal.