title: Relative path File not found exception
body: <p>I am working on a simple web application in NetBeans where I am getting FileNotFoundException. I have stored files in class path, so I need to use relative paths. When I tried with absolute path, it worked fine for me.</p>
  <p>Below image shows my file system hierarchy.</p>
  <p><img src="https://i.stack.imgur.com/z6rGM.png" alt="enter image description here" /></p>
  <p>I need to write content data in file DBList.txt.</p>
  <p>My code is:</p>
  <pre><code>File file = new File(&quot;data/application/DBList.txt&quot;);
  PrintWriter writer = new PrintWriter(new BufferedWriter(new FileWriter(file)));
  </code></pre>
  <p>I have searched lot but not getting solution for reading file using relative path.</p>