I have to start, stop a jar in a flow 1. I have to stop it if it is already running and then start 2. All this is being worked in Udeploy. 3. I'm installing the jar using the below command. java -jar jarname.jar
When I use sc query servicename, it says the service is not installed as a Windows service. So, I can check, stop and start if it is only a windows service.
How can I install this as a windows service with a servicename to identify ?
You can use nssm to install a jar as a Windows service. No installation of nssm is needed. Just place it somewhere on the system (preferably somewhere in your PATH) and run it.
Here is the command to execute as a batch: