windows环境下把jboss注册成 service环境

本文介绍windows环境下把jboss注册成 service环境 项

首先到http://forge.objectweb.org/project/showfiles.php?group_id=137下载 javaservice 

方法一:

设置JAVA_HOME 和JBOSS_HOME环境变量

解压javaservice压缩包之后,在命令行下运行 installjboss mysql -auto ,提示安装成功

(mysql是指jboss依赖的服务)


卸载用这个命令javaservice -uninstall jboss

方法二:

可以把 JavaService.exe拷贝到新的文件夹下,然后新建一个installjboss.bat

内容: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路径

server是你的ip地址或机器名

(示例:installjboss c:\jdk c:\jboss 192.168.0.1 -auto)


提示安装成功


卸载用这个命令javaservice -uninstall jboss




本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/dowson2002/archive/2007/04/13/1531228.aspx

你可能感兴趣的:(jdk,mysql,windows,jboss,C#)