Put Java application in background and make it read from keyboard in Linux -
i have written java application reads keyboard input , other work too. how can run app in background , make read keyboard input while in background in linux?
a process can read keyboard input if terminal/ui window/etc. has focus. can e.g. if have appropriate access rights on server make java app read socket , send data socket keyboard.
e.g.
on tty:
$ socket -sl 11555
on tty:
$ nc 0 11555 | yourjavabinary
now, whatever type in first tty, java app receive input.
Comments
Post a Comment