title: Reading a Text File From a .jar File
body: <p>I have a rookie question.</p>
  
  <p>I'm currently writing a program that takes in alot of data from a text file using the File and Scanner class as shown below:</p>
  
  <pre><code>   File data = new File("champdata.txt");
     Scanner read = new Scanner(data);
     read.useDelimiter("%");
  </code></pre>
  
  <p>The Scanner then retrieves data from the text file correctly while in the IDE, but when I run the program as a .jar file, the file cannot be retrieved.</p>
  
  <p>I've read a little about adding a text file to the .jar file itself, and using the InputStream and BufferedReader classes to read the file, but I have never used these classes, nor do I understand what they do differently/how to use them in place of the File and Scanner classes.</p>
  
  <p>Can anyone help me out?</p>