I would like your tipps about implemening a command line interface to interact with a running java application.
Example:
The Java Application is a webserver and a cli-client should interact with it:
1 ) Start server application:
java -jar webserver.jar
2) Get status of the running application: java -jar webserver.jar --status
or other commands like: java -jar webserver.jar --add-user Paule --password 1234
so adding an entry in a hashmap in the running application.
Does anyone know a Best-Practice tutorial about this?
Implementing a HTTP/TCP/UDP/UNIX-Socket would be one solution for interaction.
An other solution would be reading external resources and placing commands in a file for example.
What is your way to implement this?
Is there a technical term for interaction with a running thread?
Thanks in Advance