This is a dummy question. Sorry to ask
I launch a jar that requires some inputs. I would like to automatize this step :
$ java -jar foo.jar
Type of treatment
0 [x] Extraction of the delivery files
1 [ ] Installing the patch or version
input selection:
0
press 1 to continue, 2 to quit, 3 to redisplay
1
Select the log directory []
/tmp/log
press 1 to continue, 2 to quit, 3 to redisplay
1
Basically, I have to answer "0 1 /tmp/log 1" everytime I am installing this jar and I would like to automatise the process.
I tried with a file "answer.txt" containing
0
1
/tmp/log
1
With the command :
java -jar foo.jar < answer.txt
However, it does not work. I am not the owner of the jar and I cannot modify it.
Any clue ?