I\'ve just inherited a java application that needs to be installed as a service on XP and vista. It\'s been about 8 years since I\'ve used windows in any form and I\'ve neve
it's simple as you have to put shortcut in
Windows 7
C:\users\All Users\Start Menu\Programs\Startup
(Admin) or User home directory(%userProfile%)
Windows 10 :
In Run shell:startup
in it's property -> shortcut -> target - > java.exe -jar D:\..\runJar.jar
NOTE: This will run only after you login
With Admin Right
sc create serviceName binpath= "java.exe -jar D:\..\runJar.jar"
Will create windows service
if you get timeout use cmd /c D:\JAVA7~1\jdk1.7.0_51\bin\java.exe -jar d:\jenkins\jenkins.war
but even with this you'll get timeout but in background java.exe will be started. Check in task manager
NOTE: This will run at windows logon start-up(before sign-in, Based on service 'Startup Type
')
Detailed explanation of creating windows service