I'm trying to pass a .txt file as a paramater into my java program. The line that reads in the file is:
Scanner in = new Scanner(System.in);
My program is titled SetTest and the file I'm trying to read is Ted.txt. If I go to a Windows 7 command prompt I create a temp folder and compile my porgram there creating SetTest.class. Also in that folder is Ted.txt. From that temp directory I then issue the command:
java SetTest < Ted.txt
Everything works great.
My question is how do I duplicate this using Eclipse? Where does the file (Ted.txt) need to be located and how do I pass it into my program?