title: How to use processBuilder in Java to execute an exe with arguments in Windows Command Prompt
body: <p>This is the code I've been using:</p>
  
  <pre><code>            ProcessBuilder process = new ProcessBuilder("C:\\Users\\path\\to\\exe\\my_exe.exe ",
                  "my_exe.exe", "/removeDrive", "driveLocation");
              process.start();
  </code></pre>
  
  <p>All this seems to do is run the exe, but I can't get it to run the command I want.</p>
  
  <p>The command in CMD would be:</p>
  
  <pre><code>C:\users\path\to\exe&gt;my_exe.exe /removeDrive driveLocation
  </code></pre>
  
  <p>The command works fine in windows Command Prompt</p>