title: Where does Java put resource files when I JAR my program?
body: <p>Been looking for this for the past 2 hours and can't find anything (I've found solutions to the same problem but with images, not text files).</p>
  
  <p>Pretty much, I made a program that reads a text file. The file is a list of names and IDs. Using Eclipse, I put the file in my src folder and in the program put the path file to it. Like this: </p>
  
  <pre><code>in = new BufferedReader(new FileReader(curDir+"\\bin\\items.txt"));
  </code></pre>
  
  <p>Where curDir is the user's current directory (found with System.getProperty("user.dir")). </p>
  
  <p>Now, problem is, the program runs fine when I run it from Eclipse, but when I try to make it a runnable JAR and then run it, the program runs, but the info from the text file does not load. It look like Eclipse is not putting the text file with the JAR. </p>
  
  <p>EDIT: Solved-ish the problem? So the JAR file needs to the in a folder with all the original files? I am so confused, what is a JAR file then?</p>