feeding input to a java process from a batch file
- by YGL
If I have a simple java program that processes lines of text from standard input, then I can run it with the following script:
@Echo off
java Test < file.txt
pause
exit
The script redirects lines of input from a separate file.
Is there a way that I can avoid having to use an extra file? Or is this the easiest way?
Thanks.