B4J Question How Send command to Non-UI app via terminal?

Douglas Farias

Expert
Licensed User
Longtime User
Hi all.
i m working on a TCP server with B4J Non UI.
i m starting the jar file with this command line.

B4X:
java -cp servidor.jar servidor.tcp.main teste

it is working, is runing on a vps with centos 7.
my question is, its possible write a command line when the jar is runing(in real time)?

for example, when i run the jar.
B4X:
[root@vps6529 home]# java -cp servidor.jar servidor.tcp.main teste
teste
Usuários Conectados: 0

i want to send a command to the jar like (disconnect_All)

B4X:
[root@vps6529 home]# java -cp servidor.jar servidor.tcp.main teste
teste
Usuários Conectados: 0
disconnect_All

i can write disconnect_All and press enter on console, but how can i get this command on the jar (b4j)
?

on app start i can get args with this > AppStart (Args() As String)
but how can i get the command lines in real time? when the app is runing?

thx





Edit: i found this, READLINE function.
 
Last edited:
Top