Java console pushes input when registering

Via the MobaXterm SSH Function, I am running a Java application on a remote Linux server. The problem occurs when I try to enter into the terminal (for processing user input requests through Scanner ) and any logging occurs. The text that I print is automatically entered into the registration section when any print statements occur. A.

Clarification example:

  • I manually type "MY_INPUT_TO_SET_SOME_VARIABLE 50" in the console (and never press ENTER).

    enter image description here

  • Some registration is performed on the server and automatically "sends" the manually displayed "MY_INPUT_TO_SET_SOME_VARIABLE 50" to the display area.

    enter image description here

    (above, you can see that 50 is being added to 09:08 when I never pressed the enter button).

The desired behavior should allow the user of power to simply type in the text area of ​​the terminal (or somewhere reasonably) until the ENTER key is pressed. Text in the text area of ​​the terminal should not automatically click on registered or printed statements. I looked in the terminal settings and could not find anything to change this behavior.

+4
1

, .

tty, .

root , , , . , , .

- screen , tty. :

ssh -t user@server /usr/bin/screen

.screenrc , ,

startup_message off

. , .

ssh -t user@server /usr/bin/screen your_start_command_here

, , .. . .

( , -, , . , stdout)

+2

Source: https://habr.com/ru/post/1682516/


All Articles