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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -