title: Java & Mac - How to write a file to relative path
body: <p>I'm on a mac with a script that's writing files to the Documents folder. But I want to be able to write it where I can send it to my friends and they don't have to change the file's path.</p>
  <pre><code>File myFile = new File(&quot;Users/MyName/Documents/Test/user.text/&quot;);
  </code></pre>
  <p>Is there a way where I can make it relative where I don't have to switch around the <code>MyName</code> to whatever the next person PC's name is?</p>