public class StopWindowsService extends Object
Modifier and Type | Field and Description |
---|---|
static int |
SERVICE_NOT_FOUND
The service could not be found.
|
static int |
SERVICE_STOP_ERROR
The service could not be stopped.
|
static int |
SERVICE_STOP_SUCCESSFUL
The service was successfully stopped.
|
Constructor and Description |
---|
StopWindowsService() |
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args)
Invokes the net stop on the service corresponding to this server.
|
static int |
stopWindowsService(OutputStream outStream,
OutputStream errStream)
Invokes the net stop on the service corresponding to this server, it writes
information and error messages in the provided streams.
|
public static final int SERVICE_STOP_SUCCESSFUL
public static final int SERVICE_NOT_FOUND
public static final int SERVICE_STOP_ERROR
public StopWindowsService()
public static void main(String[] args)
args
- The command-line arguments provided to this program.public static int stopWindowsService(OutputStream outStream, OutputStream errStream)
outStream
- The stream to write standard output messages.errStream
- The stream to write error messages.SERVICE_STOP_SUCCESSFUL
,
SERVICE_NOT_FOUND
or SERVICE_STOP_ERROR
depending on whether the service could be stopped or not.Copyright © 2010-2016 ForgeRock AS. All Rights Reserved.