1.https://github.com/winsw/winsw/releases/tag/v2.9.0
2.去下载相关exe,和xml文件
3.修改xml文件
<service>
<!-- jar 包名称-->
<id>baiyou50</id>
<name>baiyouService</name>
<description>This service is a service created from yangjie</description>
<executable>java</executable>
<arguments>-jar "jar所在位置"</arguments>
<priority>Normal</priority>
<logpath>%BASE%\logs</logpath>
<log mode="append"></log>
</service>
4.
注意下载exe,xml和jar包名字相同,不然会出现问题
5.点击键盘shfit键,按鼠标右键,在此处打开命令窗口
运行名 baiyou50.exe install, 服务就添加成功,去服务中启动就行
不想安装服务,执行命令: baiyou50.exe uninstall