Installation of jboss 3.2 as windows service under Windows 2000 and XP

General

Date: November, 22nd, 2003
Revised: November, 4th 2004

Author: Sebastian Hennebrueder

System Requirements

Tested under Windows 2000 and Windows Xp with Jboss 3.2.5 and javaservice 1.2.3

Short introduction

We will install the program javaservice as windows service. This program starts the Jboss Server.

Download the sources

In November 2004 the up to date version is Javaservice 1.2.3. The original version has been developed by Alexandria Software Consulting. http://www.alexandriasc.com/software/JavaService/index.html, but they are not continuing the project.

The most up to date version can be found at http://www.multiplan.co.uk/software/javaservice/ . You only need the file javaservice.exe from the zip file available from this site. But I included the version 1.2.3 in the following zip file.

Download the installation scripts and the javaservice 1.2.3 from the following resource:

http://www.laliluna.de/tutorial/jboss-windows-service/jboss_windows_service.zip

Installation

Variant a)

When you don't want to change anything to the parameters, make sure that the system variables JAVA_HOME and JBOSS_HOME are set. You need to reboot your computer after setting this variables.

Call the file install.bat with the parameter default.


Variant b)

Call the file install.bat with the following parameters:

  1. {JAVA_HOME} directory of the JAVA SDK, can be recognized by the sub directories lib, bin, include, jre

  2. {JBOSS_HOME}directory of the JBOSS installation. There must be a file run.jar under JBOSS_HOME bin .

  3. classic, server oder hotspot. In the directory JAVA_HOME jrebin{classic|hotspot|server} you must find the file jvm.dll.
    I did not have any hotspot or classic, so I used server.

  4. Specify dependent Services (e.g. a Database Server) Input "" when there are no dependent services. You cannot specify more than one service. Do this later in die service administration.

  5. Specify how to start the server "-manual" oder "-auto". Only "-manual" worked during my installation. But I could change this in the service administrator after the installation.

  6. Parameter for the Java Virtual Machine. E.g. -Xmx256M to expand the maximal memory used from 64 MB (Standard) to 256 MB.

  7. The name of the jboss service shown in the service administration.

Start the installation script. The file javaservice.bat is copied to {jboss_home}bin and renamed to jbossservice.exe. Then the jbossservice.exe is executed. You get a message indicating a successfully or not successfully installation.

When you installed jboss with the parameter -manual (Default). Start jboss from the command shell (Go to the shell with Windows Start -> Execute: cmd):

net start service name

default installation:

net start Jboss
Open your Internet browser
http://127.0.0.1:8080/jmx-console/ . Replace the IP if the service is not installed locally. 8080 is the standard port.

Problems?

Open the Service administration. (Click with the right mouse button on the Workplace symbol, choose Administration -> Services -> Services.

If Jboss has to be started manually, start it from there. Look in the log files in JBOSS_HOMEbin. You will find two files: err.log and out.log.

If jboss is started automatically, try to restart it. I had problem with the installation of jboss when I specified -auto. I uninstalled the service, reinstalled it with -manual setting. I changed the setting later in the service administration to -auto. This worked!

Stop the service

Input
net stop service name in the command shell.

Uninstall

Uninstall the service by calling the script uninstall with the service name as parameter.

uninstall service name

Sometimes the service cannot be uninstalled. It is tagged as deactivated in the service administration. A restart of the computer will delete the service.