title: Where does Netbeans read files from?
body: <p>I'm trying to read from a text file in Netbeans. In the top level of my project directory I have foo.txt. Then in my code I have:</p>
  
  <pre><code>File file = new File("foo.txt");
  </code></pre>
  
  <p>It throws a <code>FileNotFoundException</code>, however. It's a Java web application using Spring and Tomcat, but I'm not sure if those details matter since I'm running the whole thing inside Netbeans. Basically, I just want to know where I need to put the file so Netbeans will read it.</p>
  
  <p>Update - good call guys, it's looking in Tomcat's bin directory. Now this may be a stupid question but, how would I go about getting it to look in my top level project directory? I feel like dropping text files into tomcat's bin would be innapropriate.</p>