Q:

Read and write file outside Jar

I am making my first executable crossplatform jar file from a bunch of java files that I have. Problem is, I need to read in some values from a txt file just outside my file. This was working well before, where I would plop down said txt just next to my .class file and call 
javac myClass this.txt

now this doesn't work, and the output I expect right outside said class doesn't work either. 
Any ideas? Thank you.

A:

I found this as the answer:
Use the File reader class, as opposed to using a Scanner with a File ala
Scanner scan= new scanner(new File("foo.txt")); //doesn't work

Scanner scan= new Scanner(new FileReader("foo.txt")); //does;

Thank you.

