title: Relative file path in java
body: <p>I have this code:</p>
  
  <pre><code> Process p = Runtime.getRuntime().exec(command.toString(), null, 
                                            new File("D:\\Cognity"));
  </code></pre>
  
  <p>But the thing is the Cognity directory is not always in D:\, it could be in C:\ etc. So my question is if there is <strong>a way to give it a relative path so I don't have to change this code depending on the PC that uses the program?</strong></p>