Windows下将GlassFish V4安装成系统服务

来源:互联网 发布:编程达人 编辑:程序博客网 时间:2024/05/15 23:47

其实非常简单,直接上代码吧。

C:\glassfish4\bin>asadmin create-serviceThe Windows Service was created successfully.  It is ready to be started.  Hereare the details:ID of the service: domain1Display Name of the service:domain1 GlassFish ServerServer Directory: C:\glassfish4\glassfish\domains\domain1Configuration file for Windows Services Wrapper: C:\glassfish4\glassfish\domains\domain1\bin\domain1Service.xmlThe service can be controlled using the Windows Services Manager or you can use theWindows Services Wrapper instead:Start Command:  C:\glassfish4\glassfish\domains\domain1\bin\domain1Service.exe startStop Command:   C:\glassfish4\glassfish\domains\domain1\bin\domain1Service.exe stopRestart Command:  C:\glassfish4\glassfish\domains\domain1\bin\domain1Service.exe restartUninstall Command:  C:\glassfish4\glassfish\domains\domain1\bin\domain1Service.exe  uninstallInstall Command:  C:\glassfish4\glassfish\domains\domain1\bin\domain1Service.exe  installStatus Command: C:\glassfish4\glassfish\domains\domain1\bin\domain1Service.exe statusYou can also verify that the service is installed (or not) with sc query state=allwindows.services.uninstall.good=Found the Windows Service and successfully uninstalled it.For your convenience this message has also been saved to this file: C:\glassfish4\glassfish\domains\domain1\PlatformServices.logCommand create-service executed successfully.C:\glassfish4\bin>


代码片段里不支持高亮吗?有意思。

0 1
原创粉丝点击