I have a rookie question.
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:
File data = new File("champdata.txt");
Scanner read = new Scanner(data);
read.useDelimiter("%");
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.
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.
Can anyone help me out?