Using the Gradle SSH plugin I deploy a .jar
file to another machine.
I then would like to run that jar in a detached screen
session.
This wouldn't be a problem if the application did not require input on STDIN, running screen -dmS screen-name java -jar my.jar
.
I tried to provide the input (beside others approaches) in the following way using a here-string, yet I did not get any of them to work:
screen -dmS screen-name java -jar my.jar <<< "firstInputLine
SecondInputLine
"
Can anyone point me in the right direction? Thanks!