Automatically running a Java application at OS startup

后端 未结 2 2038
隐瞒了意图╮
隐瞒了意图╮ 2020-12-19 17:25

I need some way of starting my Java application without forcing the user to run the application manually. I\'m not entirely sure how I would do it, can anyone provide any as

相关标签:
2条回答
  • 2020-12-19 17:41

    use registry editor to add path of .exe file to startup goto Run from start menu, type regedit.exe

    then navigate to HKEY_CURRENT_USER / SOFTWARE / MICROSOFT / WINDOWS / CURRENT_VERSION / RUN

    on the right side, create a new string value with

    name = "anything" and value = java.exe -jar "complete path of the file"

    press ok to save the registry entry, restart your pc to see effect

    0 讨论(0)
  • 2020-12-19 17:45

    Run it as a Windows Service. It's the way to go.

    For various ways to run it as a service, check out the answers to the following questions:

    • Install java program as a windows service: Alternative to JavaService?
    • How to create a windows service from java app

    You can also read this article.

    0 讨论(0)
提交回复
热议问题