Running JBoss EAP 6 as a Windows Service

I spent some time myself trying to figure out how to easily install JBoss EAP as a Windows service.  I then came across an excellent thread post on which let me do what I wanted.  My own post will be based on that.

Files You’ll Need

First, you’ll need commons-daemon-1.0.15.jar, which is from Apache and can be downloaded here.

Second, you’ll want prunsrv.exe, also from the Apache commons-daemon library.  But this item you’ll need to get from the Windows binary downloads section.

Lastly, you’ll need the batch file that will create the service for you, using the previously acquired jar and exe.  This file can be found directly in either the comment I am basing this post on (, or the bugzilla ticket that post is basing itself on.

Place everything in %JBOSS_HOME%\modules\system\layers\base\native\sbin

Installing the Service

Open up a command prompt in the sbin directory previously mentioned.  And run

service.bat install

The parameters you can pass to this batch file are as follows (pulled from the batch file’s usage output):

  • /controller <host:port>: The host:port of the management interface
    • default: %CONTROLLER% – “localhost:9999”
  • /host [<domainhost>]: Indicates that domain mode is to be used with an optional domain controller name
    • default: %DC_HOST% – “master”
    • Not specifying /host will install JBoss in standalone mode
  • /loglevel <level>: The log level for the service: Error, Info, Warn or Debug (Case insensitive)
    • default: %LOGLEVEL% – “INFO”
  • /name <servicename>: The name of the service – should not contain spaces
    • default: %SHORTNAME% – “JBossEAP6”
  • /desc <description>: The description of the service, use double quotes to allow spaces
    • default: %DESCRIPTION% – “JBoss Enterprise Application Platform 6”
  • /serviceuser <username>: Specifies the name of the account under which the service should run.
    • Use an account name in the form DomainName\UserName
    • default: not used, the service runs as Local System Account
  • /servicepass <password>: password for /serviceuser
  • /jbossuser <username>: jboss username to use for the shutdown command
  • /jbosspass <password>: password for /jbossuser

5 thoughts on “Running JBoss EAP 6 as a Windows Service

  1. couas

    Ok Do you have an idea Service is installed but not running and i have no Jboss Log
    Le service JBOSS_EAP6_SERVICE s’est arrêté avec l’erreur spécifique au service suivante :
    Fonction incorrecte.





  2. Farshid

    I try this on jboss 6.3 but not work !!!
    this Error :
    Config file not found “C:\jboss-eap-6.3\modules\system\layers\base\native\sbin\service.conf.bat”

    ERROR: Service name not set. Cannot continue.

    Provide SERVICE_NAME environment variable or set it inside file.

    Please Help me?!!

  3. Farshid

    I test on jboss-eap-6.3 but Service is intalled, but not starting !!
    Show This Error:
    windows could not start the Jboss SVN on local computer. for more information , review the system Event log. if this is a non-microsoft service contact the service vendor and refer to service-specific error
    Please Help me


Leave a Reply

Your email address will not be published. Required fields are marked *