title: Writing to file inside package Java
body: <p>Hi I am new to Java, so kindly bear me.
  I am reading info from a file and want to write to it.I am using eclipse.</p>
  
  <p>My directory structure is </p>
  
  <p><code>ProjectName--&gt;src--&gt;Package</code> (This is my package where my java files are)</p>
  
  <p>I am trying to create a jar file. My text file is inside the package.</p>
  
  <p>To read from file i am using below code.</p>
  
  <pre><code>InputStream is = getClass().getResourceAsStream("BookingInfo.csv");
  InputStreamReader isr = new InputStreamReader(is);
  br = new BufferedReader(isr);
  </code></pre>
  
  <p>Now i want to write to same file.I am doing something like this </p>
  
  <pre><code>String filename ="src/Package/BookingInfo.csv";    
  File myFile = new File(filename);  
  fw = new FileWriter(myFile,true);
  fw.write(report);
  fw.close();
  </code></pre>
  
  <p>But somehow its not updating it. Can you kindly adivise me on this.</p>