title: How to use relative path instead of absolute path?
body: <p>So I am having a strange issue with Java.</p>
  
  <p>I'm reading a writing files, so the path is important to me. I would like all files to be written and read from the relative path (i.e in the folder with the rest of my class and java files).</p>
  
  <p>I write files like so:</p>
  
  <pre><code>FileWriter fw = new FileWriter(outfile,true);
  fw.write(data);
  fw.close();
  </code></pre>
  
  <p>where outfile is something like 'out.txt' (i.e. the name of the file we want the output to go in).</p>
  
  <p>The problem is, the file is created in <code>/home/me/</code> instead of the path of my other files.</p>
  
  <p>Am i doing something wrong? Or how can i get the files stored in the relative directory?</p>