First, download javaservice.exehttp: //multiplan.co.uk/software/javaservice/downloads.htmlinstalljboss scripting examples In an example, JBoss must rely on some (for example, mysql) service, I don't have to rely on anything here, so change as follows: Intallboss. Bat @ echo off
IF "% 1" == "" goto errif "% 2" == "" goto errif "% 3" == "" goto errif "% 4" == "" Goto ERR
Goto OK
: ERR
Echo -------- Echo usage: Echo% 0 JDK_HOME JBOSS_HOIC / 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 Mustecho Install this Separately if you wish to use it.echo example:% 0 c: /jdk1.3.1_04 c: / jboss hotspot mysql -autoecho - ------ Goto EOF
: ok
@ 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 -Or% 2 / bin / out.log -err% 2 / bin / err.log -current% 2 / bin% 4
Goto EOF
: eof
@ Echo. @ echo. Then run the command to install in the command line: installjboss -java_home_path -jboss_home_path Server -autojava_home_path is your JDK path jboss_home_path is your JBossHome path prompt installation successfully used Net Start Jboss to try, success! Uninstall this command javaservice -uninstall jbossrj-lxh (original)