Assumming that program name is "XML.java",
I need to perform the followings for each input file in command line--without running the code for every test file:
java Xml < input1.txt
java Xml < input2.txt
So My Code IS:
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
String fileName = bf.readLine();
File file = new File(fileName);
FileReader fr = new FileReader(file);
Question: but I can not redirect to file by <. So everytime I run "XML.java",
I must enter "javac.XML java", but this does not meet the requirement above.
How can I do?
Mind adding a few lines please???????????
Extremely appreciate for any sort of help. Thanks in advance!!!!!!!