a 首先你需要下載javaserviceexe文件l 編輯一個批處理文件自己命名文件名存入和JavaServiceexe相同的目錄我命名為Jboss_Tomcat_Servicebat此文件的內容@echo offecho
echo Usage: % jdk_home tomcat_home (classic/hotspot/server)echo NOTE: You MAY NOT use spaces in the path names If you know howecho to fix this please tell meecho JDK does not come with hotpot server by default
you mustecho install this seperately if you wish to use itecho Example: % \jdk \jboss hotspot
echo
if % == uninstall goto uninstall
if % == uninstall goto uninstall
if % == goto usage
if % == goto usage
if % == goto usage
if % == help goto usage
if % == ? goto usage
if % == /? goto usage
:install
JavaServiceexe install JBoss %\jre\bin\%\jvmdll Djavaclasspath=%\lib\toolsjar;%\bin\runjar start orgjbossMain stop orgjbossMain method systemExit out %\bin\outtxt current %\bin goto eof
:uninstall
JavaServiceexe uninstall JBoss
goto eof
:usage
echo To Install JBoss do
echo Usage: % jdk_home jboss_home (classic/hotspot/server)
echo NOTE: You MAY NOT use spaces in the path names If you know how echo to fix this please tell me
echo JDK does not come with hotpot server by default
you must echo install this seperately if you wish to use it
echo Example: % \jdk \jboss hotspot
echo
echo To Uninstall JBoss do
echo Usage: % uninstall echo
goto eof
:eof
[] [] [] [] [] [] [] []
From:http://tw.wingwit.com/Article/program/Java/ky/201311/29223.html