For Windows platforms

Starting and stopping a Liberty server as a Windows service

You can optionally register the Liberty server as a Microsoft Windows Service program when you run on Windows operating systems. You can manually start, stop, and unregister the Liberty server as a Windows service. You can also use the Microsoft Windows Services program to change Liberty to start automatically as a Windows service when the Windows server starts.

Before you begin

Set the JAVA_HOME environment variable before you run the following commands. You can use the server.env file path to set the JAVA_HOME value reliably. For more information about using the server.env file, see Customizing the Liberty environment.

About this task

The commands to register, start, stop, and unregister Liberty as a Windows service use the same server.bat file that is used when you start the Liberty server from the command line. For available values of [options], see Server command options.

Procedure

What to do next

When you install a fix pack by using archives, the directory under which the fix pack is installed can change from the directory where the Liberty server was running before you installed the fix pack. If you are running a Liberty server as a Windows service, then unregister that Liberty server as a Windows service before you install the fix pack. After you install the fix pack, register the Liberty server as a Windows service again.

If you need to manually remove Liberty as a Windows service, then update the Windows registry by using the Windows regedit program. The two entries that need to be removed from the Windows Registry are in the following locations:
HKEY_LOCAL_MACHINE->SOFTWARE->Wow6432Node->Apache Software Foundation->Procrun 2.0->serverName
HKEY_LOCAL_MACHINE->SYSTEM->CurrentControlSet->services->serverName

Icon that indicates the type of topic Task topic



Timestamp icon Last updated: Monday, 5 December 2016
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-libcore-mp&topic=twlp_setup_new_server_winserv
File name: twlp_setup_new_server_winserv.html