title: Jar can't access txt files
body: <p>I'm pretty new to Java and I'm facing a problem that I can't find a solution for.
  I have written a program that reads and writes to a txt file. When I run it in NetBeans it seems to be working fine, but when I try to run the JAR file, it seems as if the program can't access the txt file.</p>
  
  <p>I created the file using the following code :</p>
  
  <pre><code>File data = new File("src/data.txt");
  </code></pre>
  
  <p>Could the reason why it won't work be in the creation of the file? And if not what could it be?</p>
  
  <p>EDIT:
  The text file is being modified as program advances, if I use the inputstream I won't be able to write to or change the txt file, should I change the way on which I'm managing my data? ( txt files) or is there a way for the jar to still have access to the Txt file?</p>