Create a Windows Service: Delete a Windows Service: sc delete <service name> create a java service, named AService, using Apache Commons Daemon (prunsrv.exe) prunsrv.exe //IS//AService --Install=C:\aservice\bin\prunsrv.exe --Description="A Service" --Jvm=C:\opt\jdk\jre\bin\server\jvm.dll --Classpath="C:\aservice\lib\commons-codec-1.3.jar;r;c:\aservice\bin" --StartMode=jvm --StartClass=info.compute.example.aservice --StartMethod=windowsService --StartParams=start --StopMode=jvm --StopClass=info.compute.example.aservice --StopMethod=windowsService --StopParams=stop --LogPath=C:\apserver\logs --StdOutput=auto --StdError=auto to delete: prunsrv.exe //DS//AService Note that your start class has to have the following function: public static void windowsService(String args[]) { |
Windows >