0

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.

fran_jo
  • 69
  • 9
  • Thanks Maurice! I'll try to follow that! – fran_jo Jul 13 '17 at 10:57
  • I leave this link here: http://www.qtcentre.org/threads/57116-SOLVED-QProcess-Java-Application-Not-Working that show the use of QProcess with java -jar – fran_jo Jul 13 '17 at 13:05

0 Answers0