Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Windows Servicein JAVAWindows Service JAVA with procrun11/26/2012
arifnasution@ymail.com   1. Create java application project in “netbeans”.   2. Create main class with name Driver with 2 ...
arifnasution@ymail.com   3. Create log4j.properties.   4. Add log4j jar library to your project.                          ...
arifnasution@ymail.com   5. Clean and build project to create jar file.   6. Go to your project folder, and you will find ...
arifnasution@ymail.com   7. Go to “dist” folder and copy all files inside it   8. Create a folder for your windows service...
arifnasution@ymail.com   9. Run your renamed procrun exe (java_windows_service.exe) with this script. java_windows_service...
arifnasution@ymail.com   11. Start “Sample Service JAVA”.   12. Check your log file path and you will find it if you succe...
Upcoming SlideShare
Loading in …5
×

Tutorial windows service with java (procrun)

11,074 views

Published on

Source Code available here
http://www.mediafire.com/?yj00x36mdi46bmt

  • Hello! I have searched hard to find a reliable and best research paper writing service and finally i got a good option for my needs as ⇒ www.WritePaper.info ⇐
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Check the source ⇒ www.HelpWriting.net ⇐ This site is really helped me out gave me relief from headaches. Good luck!
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • D0WNL0AD FULL ▶ ▶ ▶ ▶ http://1lite.top/zrTJs ◀ ◀ ◀ ◀
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • source code available here http://www.mediafire.com/?yj00x36mdi46bmt
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Showing error while starting the service

    'Windows could not start the TestService on Local Compute. For more information, review the System Event Log if this is a non Microsoft Service contact the service vendor, and refer to service-specific error code 1'

    please give me any solution for this.

    shebin
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Tutorial windows service with java (procrun)

  1. 1. Windows Servicein JAVAWindows Service JAVA with procrun11/26/2012
  2. 2. arifnasution@ymail.com 1. Create java application project in “netbeans”. 2. Create main class with name Driver with 2 attributes (Logger with name log and Boolean with name stop attributes), 3 static methods (main, start and stop) and fill the class with source code like this picture. 1
  3. 3. arifnasution@ymail.com 3. Create log4j.properties. 4. Add log4j jar library to your project. 2
  4. 4. arifnasution@ymail.com 5. Clean and build project to create jar file. 6. Go to your project folder, and you will find “dist” folder which generated from build and clean process. 3
  5. 5. arifnasution@ymail.com 7. Go to “dist” folder and copy all files inside it 8. Create a folder for your windows service and paste all files from “dist” folder. In this sample, I create “sample_windows_service” folder in drive d and copy procrun.exe & procrunmgr.exe to your folder and rename it (I rename it into java_windows_service.exe & java_windows_service_mgr.exe). 4
  6. 6. arifnasution@ymail.com 9. Run your renamed procrun exe (java_windows_service.exe) with this script. java_windows_service.exe //IS//SampleService --Install="D:sample_windows_servicejava_windows_service.exe" --Jvm=auto -- Startup=auto --StartMode jvm --StartClass sample.windows.service.Driver --StartParams start --StopMode jvm --StopClass sample.windows.service.Driver --StopParams stop --Classpath="D:sample_windows_servicejava_windows_service.jar" -- DisplayName="Sample Service JAVA" 10. You will find “Sample Service JAVA” in services.msc. 5
  7. 7. arifnasution@ymail.com 11. Start “Sample Service JAVA”. 12. Check your log file path and you will find it if you succeed. = Thank you = 6

×