title: Setting working directory for ProcessBuilder is not working
body: <p>I am trying to run a file called test.pdf which is located at C:/Software/ using ProcessBuilder. Following is my code</p>
  
  <pre><code>public static void main(String[] args) throws IOException {
  
           ProcessBuilder pb = new ProcessBuilder("test.pdf");
           pb.directory(new File("C:/Software/"));
           pb.start();
  
      }
  </code></pre>
  
  <p>And I'm getting the following exception.</p>
  
  <pre><code>Exception in thread "main" java.io.IOException: Cannot run program "test.pdf" (in directory "C:\Software"): CreateProcess error=2, The system cannot find the file specified
      at java.lang.ProcessBuilder.start(Unknown Source)
      at com.test.Test.main(Test.java:12)
  Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
      at java.lang.ProcessImpl.create(Native Method)
      at java.lang.ProcessImpl.&lt;init&gt;(Unknown Source)
      at java.lang.ProcessImpl.start(Unknown Source)
      ... 2 more
  </code></pre>
  
  <p>I checked this <a href="https://stackoverflow.com/questions/8405723/how-to-set-working-directory-with-processbuilder/8405745">How to set working directory with ProcessBuilder</a> thread in stackoverflow. But didn't have any luck. Can anyone help on this? Thanks</p>