linux - Java feed cmd arguments from file -


i hava java program depends on argument list work. , want unit test on windows or linux. wanna feed arguments program text file. without changing in program. possible?

something like:

java myprogram **-arg "test.txt"** 

or

java myprogram **< test.txt** 

or

java myprogram **type text.txt** 

everything bolded ofcourse made me , doesn't work, think point quite clear.

for linux:

 program="java myprogram "`cat test.txt` exec $program 

i think, must similar windows


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -