title: QProcess doesn't start java app under windows 7
body: <p>I'm writing a windows application using Qt (4.6.1) that uses QProcess class to execute a java application.</p>
  
  <p>Here's basically the code:</p>
  
  <pre><code>process = new QProcess(this);
  connect( process, SIGNAL( started() ),                  this, SLOT( onProcessStarts() ) );
  connect( process, SIGNAL( finished(int) ),              this, SLOT( onProcessEnds(int) ) );
  connect( process, SIGNAL( readyReadStandardOutput() ),  this, SLOT( onProcessOutputs() ) );
  connect( process, SIGNAL( error(QProcess::ProcessError)), this, SLOT(onProcessError(QProcess::ProcessError)));
  
  QStringList arguments;
  arguments &lt;&lt; "-jar";
  arguments &lt;&lt; "absolute_path\app.jar";   //the java app that I want to execute
  arguments &lt;&lt; "-blah-blah";              //some java app's arguments
  process-&gt;start( "java", arguments );
  </code></pre>
  
  <p>This is how I start the java application, and it works ok BUT, as far as I tested only in my Windows XP machine. When I tested this on another computer with Windows 7, it failed.</p>
  
  <p>In Windows 7, the QProcess signal <strong>error(QProcess::ProcessError)</strong> is emitted after process->start(...) giving me the error <strong>QProcess::FailedToStart</strong></p>
  
  <p>Also I tested this:
      QStringList arguments;
      arguments &lt;&lt; "/c";
      arguments &lt;&lt; "java";
      arguments &lt;&lt; "-jar";
      arguments &lt;&lt; "absolute_path\app.jar";   //the java app that I want to execute
      arguments &lt;&lt; "-blah-blah";              //some java app's arguments
      process->start( "cmd.exe", arguments );
  But then cmd.exe complains not finding java...</p>
  
  <p>I suspect there's some permission issue involved; I set my executable to be run as administrator, but no luck, so I have run out of ideas...</p>
  
  <p>Obivously, java is installed in Windows 7 machine (calling it manually from cmd.exe works).</p>