java 如何使jar文件在启动时运行

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7700602/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 21:03:10  来源:igfitidea点击:

How to make a jar file run at start up

javajar

提问by gsfd

I have a game that has a side application that acts as an updater. The updater can check for updates hourly, daily or weekly. I want this updater to be ran at startup so that it can check for updates. How do i make my executable jar file run at startup on a windows xp and windows 7?

我有一个游戏,它有一个作为更新程序的辅助应用程序。更新程序可以每小时、每天或每周检查更新。我希望此更新程序在启动时运行,以便它可以检查更新。如何使我的可执行 jar 文件在 Windows xp 和 Windows 7 上启动时运行?

回答by Racooon

1.goto Start -> Run and then write "REGEDIT"

1.转到开始->运行然后写“REGEDIT”

goto HKEY_LOCAL_MACHINE/SOFTWARE/MICROSOFT/Windows/Current Version/Run

转到 HKEY_LOCAL_MACHINE/SOFTWARE/MICROSOFT/Windows/当前版本/运行

Add a String on the right side, and set the Path for your JAR file.

在右侧添加一个字符串,并为您的 JAR 文件设置路径。

2.Or you can add your JAR file into START/ALL PROGRAMS/Autostart

2.或者您可以将您的 JAR 文件添加到 START/ALL PROGRAMS/Autostart