Windos下 java后台软件服务化(举例)-WinSW
2024-09-08 18:36:42
WinSW-软件服务化
1.1 举例:ApiWintool可执行jar
ApiWintool.exe
ApiWintool.jar
ApiWintool.xml
install.cmd
uninstall.cmd
1.2 举例:ApiWintool.xml
<service>
<!--windows服务id 必须唯一 -->
<id>ApiWintool</id>
<!-- windows服务名称-->
<name>ApiWintool</name>
<!-- 描述 -->
<description>自研发的后台</description>
<!-- 启动的可执行文件 %BASE%为当前demo.exe所在路径-->
<executable>C:\Program Files\Java\jdk1.8.0_192\jre\bin\java.exe</executable>
<!-- 传递给可执行文件的参数-->
<arguments> -jar "%BASE%\ApiWintool.jar"</arguments>
<!--日志模式 -->
<logmode>rotate</logmode>
<!-- 日志文件路径-->
<logpath>%BASE%/logs</logpath>
<!-- 开机自启 -->
<startmode>Automatic</startmode>
</service>
1.3 ApiWintool的install.cmd
@echo.InstallService......
@echo off
@ApiWintool install
@ApiWintool start
@echo off
@echo.Success!
1.4 ApiWintool的uninstall.cmd
@echo.UnInstallService
@echo off
@ApiWintool stop
@ApiWintool uninstall
@echo off
@echo.DeleteSuccess!
最新文章
- jquery_DOM笔记
- C# 图片的裁剪,两个图片合成一个图片
- tesseract-ocr 出现 错误 Please make sure the TESSDATA_PREFIX environment variable is set to the parent d irectory of your ";tessdata"; directory.解决方案
- TreeSet与TreeMap浅解
- 安卓--使用Intent实现Activity之间传值与跳转
- JAVA线程示范之一种
- swift - use backslash to add the value in the string
- Apache Tomcat 7.0 Manager APP
- HttpWebRequest上传文件(Excel等)
- eclipse 使用maven 创建web3.1项目
- PHP于DIRECTORY_SEPARATOR任务
- 算法模板——splay区间反转 2
- IIS 部署ASP.Net, WebAPI, Restful API, PUT/DELETE 报405错解决办法, webapi method not allowed 405
- class-k近邻算法kNN
- bzoj1493[NOI2007]项链工厂 线段树
- npm run dev的错误
- 使用OpenLDAP部署目录服务
- linux系统的三种网络连接模式
- python 的面相对象编程--对应c++
- Windows Server 2008配置Network Load Balancing(服务群集)
热门文章
- Pollard_Rho算法
- 浅谈LCA问题(最近公共祖先)(四种做法)
- centos搭建neo4j环境(含java)2021_12
- Java入门与进阶 P-3.5+P-3.6
- HelloWorld程序的代码编写-Hello World的编译运行
- 【推荐】MySQL数据库设计SQL规范
- @ControllerAdvice解密请求,加密响应
- 真正“搞”懂HTTPS协议18之TLS特性解析
- xshell连接时显示“服务器发送了一个意外的数据包。received:3,expected:20“问题的解决方法
- C语言知识补充 --来自菜鸟教程的指针复习