The CLI application can be launched when Windows starts. To do this, prepare a script that launches the CLI application as a service, and then attach it to the system schedule.
Preparation of the script
You can create a .bat executable script in a notepad, just type the following command in it:
java -jar <path_to_CLI_application> clientservice --login=<login> --password=<password> --server=<sever_address>
Save the file so prepared under any name with the extension .bat.
Running the script at system startup
Open Task scheduler on your Windows system and then choose Create Task... option
Define the task name, then go to the Actions tab and click the New button:
Then in the Program/script field indicate the path to the script you created:
Close the window confirming the creation of actions with the OK button, go to the Triggers tab and press the New... button:
When creating a trigger in the Begin the task field select At startup option:
Confirm the trigger and then the whole task with the OK button.
From now on the CLI application will start with the system startup.