![【其他】【服务器】【2】把jar包做成服务,在Service中管理 【其他】【服务器】【2】把jar包做成服务,在Service中管理](https://image.shishitao.com:8440/aHR0cHM6Ly9ia3FzaW1nLmlrYWZhbi5jb20vdXBsb2FkL2NoYXRncHQtcy5wbmc%2FIQ%3D%3D.png?!?w=700&webp=1)
三个文件:service_install.xml,service_install.exe,install-service.bat;
和xx.jar放在同一个目录下
service_install.xml
name —— 自己定义,会显示在service中
<service>
<id>BFOTC-Core</id>
<name>xx Core Service</name>
<description>xx Core Service</description>
<executable>java</executable>
<arguments>-Xmx512m -jar "xx.jar"</arguments>
<logmode>rotate</logmode>
</service>
service_install.exe
链接:https://pan.baidu.com/s/1AMjTlPXTBejgXZK8-EHqiQ
提取码:3xsa
install-service.bat
service_install.exe install
操作方法:执行install-service.bat即可
查看并执行: