jforjava: Run java application as a Windows NT Service
Thursday, December 9, 2010 Run java application as a Windows NT Service SrvAny.exe and its installer "InstSrv.exe" are applications provided by Microsoft. SrvAny allows Windows applications to run as a service. But by using those two exe we make a java class or java jar file as a windows service. I want to explain by giving a small demo to run a java class as window service. Step 1: Download srvany.exe and instsrv.exe from this link . Step 2: Go to DOS prompt and type the command like c:\ instsrv.exe srvany.exe Above command will create a service with the given name in <> brackets. e.g. c:\srvany\instsrv.exe Testing c:\srvany\srvany.exe This will create a service with the name "Testing" ,we can check this by opening the services.msc from from control pannel. Step 3: Now I am making a folder "Testing" in c:\ where I am putting my java application which will run as a service. I am writing a simple program which will write a text file after 5000 ms on the same location. Source :Read full article from jforjava: Run java application as a Windows NT Service
No comments:
Post a Comment