Chapter 3. Running and removing JBoss EAP as a service on Microsoft Windows Server

3.1. Running JBoss EAP as a service on Microsoft Windows server

You can configure JBoss EAP to run as a service on Microsoft Windows server. This method provides a basic default installation of a server, with configuration files and libraries placed in standard folders.


If you use the set command to set system environment variables in a Windows Server command prompt, it does not permanently set the environment variables. You must use either the setx command, or the System interface in the Control Panel.


  • You have installed JBoss EAP.
  • You have administrator privileges on the server.
  • You have set the JAVA_HOME system environment variable.
  • You have verified that the JBoss EAP server instance is not running.


  1. Use the setx command to create two system environment variables: JBOSS_HOME and NOPAUSE.
  2. Use the setx command to configure the two environment variables:

    1. Set the path for the JBOSS_HOME variable to the JBoss EAP installation directory.
    2. The jboss-cli.bat script contains the "x%NOPAUSE%" == "x" pause line of code. This code creates a status message when you issue the pause command. To disable these messages, you must specify a value for the NOPAUSE variable. For example, setting the NOPAUSE variable to NOPAUSE=true disables status messages from appearing when a script completes.

Additional resources

  • To learn more about how to set environment variables on a Microsoft Windows Server, refer to the Microsoft Windows documentation.

3.2. Removing JBoss EAP service on Microsoft Windows Server

You can remove an instance of JBoss EAP and any services associated with it. Thereafter, you can install JBoss EAP by using a suitable installation method.


  • You have JBoss EAP installed.


  1. When the service is running, open the command prompt and stop the service by entering the net stop command with the name of the service:

    net stop JBossEAP7
  2. At a command prompt, change directories to EAP_HOME\bin and execute the following command:

    service.bat uninstall