简体   繁体   中英

Windows - running command as a service

I have a command that I would like to create a service from. For example: "java -jar agent.jar" (the command is blocking - when closing the cmd it will stop the agent). I would like to make the command run as a service in the background so I can log out from my user and it will still work. On Linux, I know for a fact that I can use nohup mycommand . The problem is on Windows OS. Also, replace java with javaw will solve the blocking issue but when I sign out it will still kill the agent. How do I do that? I'll appreciate your help!

Tomer.

Use Windows services feature.

Read this answer . And this solution .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM