I read you can add a key to the registry, but there are permission problems on Windows Vista and 7. What's the safest & best way to start a Java program on System startup?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can setup a Java service wrapper to start a Java application on windows startup. http://www.google.com/search?q=java+service+wrapper
回答2:
I'd use the Task Scheduler, have it run:
java -jar file.jar
And set it to run on computer startup, and to run with the highest privileges.
回答3:
You wanna do this on code or manually ?
But is all about the Registry, why don't you check the Java Service Wrapper ?
回答4:
winsw works very nicely: http://kenai.com/projects/winsw
(requires .NET though)