title: How to create a directory at the same place as the code runs?
body: <p>I'm trying to save some output files at the same place as my Java classes. I want to use a relative path so there isn't any problem when I  move the code somewhere else. </p>
  
  <p>For the moment it writes my file under <code>/home/myUser/output_j.erome</code> and  the actual code is :  </p>
  
  <pre class="lang-java prettyprint-override"><code>FileWriter out = new FileWriter("output_j.erome",true);
  </code></pre>
  
  <p>I can't find how to create dynamically the folder at the same place as my Java classes and then add my file in it.</p>