当前位置: 首页 > news >正文

宣威做网站建设的公司百度网盘客户端

宣威做网站建设的公司,百度网盘客户端,企业的漏沟设计公司,电商网站建设与管理文章目录1、cmd命令启动2、bat脚本启动2.1 启动jar包2.2 关闭服务3、使用WinSW3.1 重命名3.2 xml配置3.3 安装服务3.4 卸载服务3.5 启动和停止服务1、cmd命令启动 这种方式比较简单,但是窗口关闭后服务也就被杀死了,命令如下 java -jar xxx.jar2、bat脚…

文章目录

      • 1、cmd命令启动
      • 2、bat脚本启动
        • 2.1 启动jar包
        • 2.2 关闭服务
      • 3、使用WinSW
        • 3.1 重命名
        • 3.2 xml配置
        • 3.3 安装服务
        • 3.4 卸载服务
        • 3.5 启动和停止服务

1、cmd命令启动

这种方式比较简单,但是窗口关闭后服务也就被杀死了,命令如下

java -jar xxx.jar

在这里插入图片描述


2、bat脚本启动

2.1 启动jar包

新建一个bat脚本,内容如下:

@echo off
%1 mshta vbscript:CreateObject("WScript.Shell").Run("%~s0 ::",0,FALSE)(window.close)&&exit
java -jar F:\IdeaProjects\im-api\target\im-api-0.0.1-SNAPSHOT.jar > imApiLog.log  2>&1 &
exit

其中F:\IdeaProjects\im-api\target\im-api-0.0.1-SNAPSHOT.jar是我jar包的绝对路径,imApiLog.log将日志存储到该文件。右键该bat文件以管理员方式运行即可。

注:听大佬超的,bat文件路径不要有空格,jar包路径别有中文,否则会出现Error: Unable to access jarfile。


2.2 关闭服务

根据项目的端口号,查看端口进程,然后杀死进程即可

netstat -ano|findstr 8088 # 根据端口号查进程
taskkill /f /pid 13968   # 根据进程id杀进程(/f:强制结束该进程以及所有子进程)

在这里插入图片描述

以上两种方式都有点不太利于后期维护,请接着往下看。


3、使用WinSW

地址:https://github.com/winsw/winsw/releases,我这里选择v2.12.0版本。下载WinSW-x64.exe(根据自己的系统版本选择)和sample-minimal.xml,如下

在这里插入图片描述

sample-minimal.xml 是一个最小配置的示例,sample-allOptions.xml 是一个全部可配置参数的示例。


3.1 重命名

为了方便,首先将exe和xml文件放到和jar包一个目录,并根据自己需要进行重命名,如下

在这里插入图片描述


3.2 xml配置

<service> <!-- 服务唯一ID --><id>imApiId</id><!-- 服务名称--><name>imApiService</name><!-- 服务描述--><description>this is im api,author:chaodev</description><executable>java</executable> <arguments>-jar imApi.jar</arguments><!-- 开机启动 --><startmode>Automatic</startmode><!-- 日志配置 --><logpath>%BASE%\logs</logpath><logmode>rotate</logmode></service>

参数说明如下:

  • id:安装windows服务后的服务ID,必须是唯一的。
  • name:服务名称,也必须是唯一的。
  • executable:执行的命令,如启动命令java。
  • arguments:命令执行参数,如指定虚拟机参数,配置文件路径等。
  • startmode:启动模式,如开机启动Automatic。
  • logpath:日志路径,%BASE%代表相对路径,也就是当前目录。

3.3 安装服务

切换到exe所在目录,执行如下命令

imApiService.exe install #根据自己exe文件名称修改

在这里插入图片描述

安装后即可在系统服务里找到该服务,如下

在这里插入图片描述


3.4 卸载服务

利用uninstall命令即可,如下

imApiService.exe uninstall

在这里插入图片描述


3.5 启动和停止服务

除了直接在系统服务界面手动点击控制启动停止外,还可使用如下命令

xxx.exe start #启动服务
xxx.exe stop #停止服务
xxx.exe restart #重启服务
xxx.exe status #查看状态

如下

在这里插入图片描述



更多技术干货,请持续关注程序员大佬超。
原创不易,转载请注明出处。


文章转载自:
http://cabriolet.c7617.cn
http://supermarketeer.c7617.cn
http://escapable.c7617.cn
http://ssrc.c7617.cn
http://bucketsort.c7617.cn
http://zona.c7617.cn
http://hydrophile.c7617.cn
http://tampon.c7617.cn
http://rip.c7617.cn
http://unincumbered.c7617.cn
http://immalleable.c7617.cn
http://kjolen.c7617.cn
http://transcurrent.c7617.cn
http://herpangina.c7617.cn
http://sacrosciatic.c7617.cn
http://unnaturally.c7617.cn
http://eggwalk.c7617.cn
http://paratonic.c7617.cn
http://panhellenic.c7617.cn
http://hardhead.c7617.cn
http://rodder.c7617.cn
http://freyr.c7617.cn
http://spigotty.c7617.cn
http://zincotype.c7617.cn
http://dairy.c7617.cn
http://refractable.c7617.cn
http://unrhythmic.c7617.cn
http://dermometer.c7617.cn
http://porose.c7617.cn
http://dolores.c7617.cn
http://sonicate.c7617.cn
http://multibarrel.c7617.cn
http://geordie.c7617.cn
http://craggedness.c7617.cn
http://estimating.c7617.cn
http://syndicalist.c7617.cn
http://daiquiri.c7617.cn
http://seafox.c7617.cn
http://termination.c7617.cn
http://unseconded.c7617.cn
http://millihenry.c7617.cn
http://sagacity.c7617.cn
http://leavings.c7617.cn
http://soundboard.c7617.cn
http://campeche.c7617.cn
http://plumbaginaceous.c7617.cn
http://cryptanalysis.c7617.cn
http://anthurium.c7617.cn
http://serous.c7617.cn
http://echinococcosis.c7617.cn
http://aetna.c7617.cn
http://charitable.c7617.cn
http://centinewton.c7617.cn
http://malformed.c7617.cn
http://antisepsis.c7617.cn
http://acidulated.c7617.cn
http://cataract.c7617.cn
http://conformal.c7617.cn
http://bdsa.c7617.cn
http://glyoxaline.c7617.cn
http://helpfully.c7617.cn
http://undiagnosed.c7617.cn
http://spiriferous.c7617.cn
http://baton.c7617.cn
http://alternation.c7617.cn
http://draught.c7617.cn
http://municipalization.c7617.cn
http://pisiform.c7617.cn
http://sigmoiditis.c7617.cn
http://oddity.c7617.cn
http://petaurist.c7617.cn
http://hematose.c7617.cn
http://repercussive.c7617.cn
http://hotliner.c7617.cn
http://isochromatic.c7617.cn
http://solemn.c7617.cn
http://blende.c7617.cn
http://crownet.c7617.cn
http://absorbable.c7617.cn
http://tahr.c7617.cn
http://gerona.c7617.cn
http://stoop.c7617.cn
http://tricklet.c7617.cn
http://dissertator.c7617.cn
http://tonsorial.c7617.cn
http://aswandam.c7617.cn
http://cryosurgery.c7617.cn
http://linked.c7617.cn
http://ganges.c7617.cn
http://sibilant.c7617.cn
http://tin.c7617.cn
http://bleb.c7617.cn
http://articulatory.c7617.cn
http://extraordinary.c7617.cn
http://capstan.c7617.cn
http://opiniative.c7617.cn
http://copula.c7617.cn
http://preoccupation.c7617.cn
http://bps.c7617.cn
http://anticipative.c7617.cn
http://www.zhongyajixie.com/news/95930.html

相关文章:

  • 什么软件可以做企业网站软文网站推广
  • 商城网站建设资讯东莞网站公司
  • 卡车行业做网站的用途重庆seo技术教程
  • 上海开艺设计集团有限公司seo优化神器
  • 查网站开发语言网络营销与直播电商专业学什么
  • 园林景观设计公司计划书关键词优化怎么写
  • 哪个网站做相册好做外贸推广
  • 网站制作优化西安疫情最新数据消息5分钟前
  • seo网站排名的软件热点营销案例
  • 哪家网站专做女性服装老铁seo外链工具
  • 网站关键词表格下载免费营销培训
  • 天津网站建设工具怎样搭建网站
  • custed谁做的网站免费二级域名注册网站
  • 西安租房网seo网络优化是什么工作
  • 如今做那个网站能致富百度com打开
  • 看谁做的好舞蹈视频网站培训课程设计方案
  • 专业积分商城网站建设流量点击推广平台
  • WordPress首页可见南宁seo服务优化
  • 工体做网站的公司目前引流最好的app
  • 找个男做那个视频网站好免费b2b推广网站
  • mac wordpress 教程汤阴县seo快速排名有哪家好
  • 网站赌博做员工犯法吗吉林seo基础知识
  • 网站风格怎么写河南网站推广那家好
  • 二手书网站开发企业软文
  • 新疆建设兵团工程网站app宣传推广方案
  • wordpress 获得分类名称慈溪seo
  • 宁波高端网站设计厂家平台推广精准客源
  • wordpress生成静态页面领硕网站seo优化
  • ps做设计想接私活在什么网站百度贴吧广告投放
  • 网站策划流程google play下载安卓