Installing JBoss Application Server

In-order to install JBoss you have to first install jre(Java Run Time Environment) as JBoss is developed by java. You have to do the following steps to install JBoss.

1.First intall Jre. You can install it at any directory you wish.

2.Then install jdk1.5.Set the jdk installing directory as JAVA_HOME Environmental varable. I have installed it at C:\Program Files\Java\jdk1.5.0_02 directory.I have set Environmental variable JAVA_HOME = "C:\Program Files\Java\jdk1.5.0_02"..

3.Then click jboss-4.0.3SP1-installer.jar to start installing jBoss and continue. Give username and password and finish installing jBoss.

4.After you have installed JBoss you need to set the installing directory of JBoss as Environmental variable JBoss_Home. I have set Environmental variable JBOSS_HOME = "C:\Program Files\jboss-4.0.3SP1".

5.Now we have completed installation process. To run JBoss go to JBOSS bin directory. My JBoss bin localtion is C:\Program Files\jboss-4.0.3SP1\bin. Then click the run.bat file to start JBoss server. To close JBoss server you need to close run.bat file. You may not like to always run the run.bat file. So a good alternative is to use JBOSS as Windows service. I have described the process below.

Running JBoss as windows service

1. Download JavaService-2.0.7.zip from http://forge.objectweb.org/project/showfiles.php?group_id=137 2. Extract to C:\JavaService-2.0.7 3. copy JavaService.exe to jboss bin directory. In our case C:\Program Files\jboss-4.0.2 4. Make sure JBOSS_HOME and JAVA_HOME are set. In our case: C:\Program Files\jboss-4.0.2 and C:\Program Files\Java\jdk1.5.0_02 respectively 5. Create a batch file install.bat in %JBOSS_HOME%/bin directory. Its contents should be as follows: Rem Start Here set javadll=%JAVA_HOME%\jre\bin\client\jvm.dll set javatool=%JAVA_HOME%\lib\tools.jar set javarun=%JBOSS_HOME%\bin\run.jar set outlog=%JBOSS_HOME%\bin\stdout.log

set errlog=%JBOSS_HOME%\bin\stderr.log JBossService.exe -install JBoss "%javadll%" -Djava.class.path="%javatool%";"%javarun%" -start org.jboss.Main -stop org.jboss.Main -method systemExit -out "%outlog%" -err "%errlog%" -current "%JBOSS_HOME%\bin" -manual Rem End Here Make sure to set word wrap off in the file and do not forget the quotes. This will allow the Program Files path to work correctly. You can change the location of stderr.log and stdout.log to server/model/log if you prefer. Start a cmd window and cd to %JBOSS_HOME%\bin. run install.bat by typing install. This will install JBoss as a service. To start the service type net start JBoss. JBoss should now be running as a service. Enjoy.

Author – ove.