title: Cannot run exe file with ProcessBuilder in Java
body: <p>I am trying to run an exe file while setting some parameters for it like this:</p>
  
  <pre>myExePath -ini myIniPath -x myConfigFilePath</pre>
  
  <p>When I run it from the command line it works perfectly. But when I try running it from my Java code the process starts but after a while is not responding anymore so I have to forcibly close it. I am using this Java code:</p>
  
  <pre><code>    List&lt;String&gt; parameters = new ArrayList&lt;String&gt;();
      parameters.add(myexePath);
      parameters.add("-ini ");
      parameters.add(myIniPath);
      parameters.add("-x ");
      parameters.add(myConfigPath
      ProcessBuilder builder = new ProcessBuilder(parameters);
      Process process = builder.start();
  
      try {
          process.waitFor();
      } catch (InterruptedException e) {
          System.err.println("Process was interrupted");
      }
  </code></pre>
  
  <p>Any ideas what I am doing wrong?</p>