title: java.io.FileNotFoundException when opening file with filewriter in Java
body: <p>I am trying to write something to a file, like this:</p>
  
  <pre><code>FileWriter fw = new FileWriter("somefile.txt", true);
  </code></pre>
  
  <p>It works correctly when started by a single process. Like this:</p>
  
  <pre><code>java -jar XXXXXXX.jar
  </code></pre>
  
  <p>But when calling it by another process, an IOException will be thrown. Example:</p>
  
  <pre><code>java.io.FileNotFoundException: 'somefile.txt' (No such file or directory)
      at java.io.FileOutputStream.openAppend(Native Method)                      
      at java.io.FileOutputStream.&lt;init&gt;(FileOutputStream.java:192)              
      at java.io.FileOutputStream.&lt;init&gt;(FileOutputStream.java:116)             
      at java.io.FileWriter.&lt;init&gt;(FileWriter.java:61)                       
  </code></pre>