glassfish自启动服务生成

本文介绍如何使用Glassfish应用服务器创建并部署服务到Windows系统中,包括创建服务域、生成服务包、启动及管理服务等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.    确保你的domain存在,如:domain1

2.    进入asadmin

3.    运行命令:asadmin> create-service domain1

4.    Glassfish会为你在你的domain下的bin目录中生成service包裹文件



asadmin> create-service domain1
The Windows Service was created successfully.  It is ready to be started.  Here are the details:
ID of the service: domain1
Display Name of the service:domain1 GlassFish Server
Server Directory: D:\payara41\glassfish\domains\domain1
Configuration file for Windows Services Wrapper: D:\payara41\glassfish\domains\domain1\bin\domain1Service.xml
The service can be controlled using the Windows Services Manager or you can use the
Windows Services Wrapper instead:
Start Command:  D:\payara41\glassfish\domains\domain1\bin\domain1Service.exe  start
Stop Command:   D:\payara41\glassfish\domains\domain1\bin\domain1Service.exe  stop
Restart Command:  D:\payara41\glassfish\domains\domain1\bin\domain1Service.exe  restart
Uninstall Command:  D:\payara41\glassfish\domains\domain1\bin\domain1Service.exe  uninstall
Install Command:  D:\payara41\glassfish\domains\domain1\bin\domain1Service.exe  install
Status Command: D:\payara41\glassfish\domains\domain1\bin\domain1Service.exe status
You can also verify that the service is installed (or not) with sc query state= all
windows.services.uninstall.good=Found the Windows Service and successfully uninstalled it.
For your convenience this message has also been saved to this file: D:\payara41\glassfish\domains\domain1\PlatformServic
es.log
Command create-service executed successfully.


5.    查看生成的服务:sc query domain1

6.    提示中明确给出了此服务的运行、停止、重启、卸载、安装、状态查看的命令行运行方式

7.    完毕

其他操作系统下的生成方式类似,glassfish的资料里面全有的。。。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值