Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Tomcat to do window self-starting Service

2025-03-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the relevant knowledge of "how to use Tomcat to do window self-starting service". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

1. Use service.bat

If you put the project under the Tomcat folder, you can go to bin\ service.bat under the Tomcat folder (for example, mine is D:\ develop\ apache-tomcat-9.0.24-windows-x64\ apache-tomcat-9.0.24\ bin), then open your cmd or powershell or terminal (is anyone using terminal), and enter this path (if you are quick, you can enter it with the right mouse button of Shift+), as shown in the figure

Enter the noble service.bat install $name in the console ($name is the name you want to give your Tomcat service, and I'll just call it Tomcat9), as shown in figure PS: if you want to delete the install, replace it with remove PPS: here is another problem, where can I modify the configuration of Jvm if you just register as a service directly? Answer 1:service.bat answer 2: registry

If you are familiar with the name, just put in what you want to change.

2. Use winsw

Winsw is an open source project, github address 1, now mostly use spring-boot built-in tomcat to start the project, my approach is to put winsw.exe and configuration accessories, winsw.xml file in the same folder of the project startup script, and then edit the winsw.xml file

Jc_service E:\ issue\ start.bat (startup script for the project) Normal 15 sec Automatic 15 sec 1 sec false

After confirming that it is correct, open cmd and execute

Winsw install (service registration) winsw uninstall (delete) "how to use Tomcat to do window self-starting service" is introduced here, thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report