title: Java resolve project path
body: <p>I am trying to return my project's file path to then create a file in said path. I successfully created the file in the path but I used the static path to my project rather than resolving it programatically  like I need to do. </p>
  
  <p>Using the <a href="http://docs.oracle.com/javase/tutorial/essential/io/pathOps.html" rel="nofollow">docs</a> i've tried creating my file:</p>
  
  <pre><code>    Path path = Paths.get("C:\\folder\\folder\\folder\\folder\\folder\\report\\");
      String filePath = path.toString() + "fileName.pdf";
      createFile(filePath, data, moreData);
  </code></pre>
  
  <p><strong>Question:</strong></p>
  
  <p>What if someone else uses a D: drive or other? How do I resolve the report folder if that is the case?</p>