WEB开发网
开发学院WEB开发Jsp 把jboss安装成windows的服务! 阅读

把jboss安装成windows的服务!

 2008-01-05 18:43:59 来源:WEB开发网   
核心提示:首先从这里下载javaservice.exehttp://multiplan.co.uk/software/javaservice/downloads.Htmlinstalljboss脚本例子中jboss必须依靠于某种(例如MySQL)服务,我这里什么都不用依靠所以更改如下:intallboss.bat@echo of

首先从这里下载javaservice.exe
http://multiplan.co.uk/software/javaservice/downloads.Html

installjboss脚本例子中jboss必须依靠于某种(例如MySQL)服务,我这里什么都不用依靠所以更改如下:

intallboss.bat
@echo off

if "%1" == "" goto err
if "%2" == "" goto err
if "%3" == "" goto err
if "%4" == "" goto err

goto ok

:err

echo --------
echo Usage:
echo  %0 jdk_home jboss_home (classic/hotspot/server) other_service [-auto / -manual]
echo NOTE:   You MAY NOT use spaces in the path names (tell me if you can fix this).
echo      JDK 1.3 does not come with hotpot server by default, you must
echo      install this separately if you wish to use it.
echo Example: %0 c:\jdk1.3.1_04 c:\jboss hotspot mysql -auto
echo --------
goto eof

:ok

@echo .
@echo .
@echo .

copy JavaService.exe %2\bin\JBossService.exe > nul

%2\bin\JBossService.exe -install JBoss %1\jre\bin\%3\jvm.dll -Djava.class.path=%1\lib\tools.jar;%2\bin\run.jar -start org.jboss.Main -stop org.jboss.Main -method systemExit -out %2\bin\out.log -err %2\bin\err.log -current %2\bin %4

goto eof

:eof

@echo .
@echo .
@echo .

然后在命令行下运行命令安装:
installjboss -java_home_path  -jboss_home_path server -auto
java_home_path是你的jdk路径
jboss_home_path是你的jbosshome路径
提示安装成功
用net start jboss试一下,成功!

卸载用这个命令javaservice -uninstall jboss


Tags:jboss windows

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接