如何在 Windows 启动时启动 Java Jar?

发布于 2024-10-09 17:58:19 字数 80 浏览 0 评论 0原文

我听说您可以向注册表添加一个密钥,但 Windows Vista 和 7 上存在权限问题。什么是最安全的?在系统启动时启动Java程序的最佳方式?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

深海里的那抹蓝 2024-10-16 17:58:19

您可以设置 Java 服务包装器以在 Windows 启动时启动 Java 应用程序。
http://www.google.com/search?q=java+service+wrapper

You can setup a Java service wrapper to start a Java application on windows startup.
http://www.google.com/search?q=java+service+wrapper

桜花祭 2024-10-16 17:58:19

我会使用任务计划程序,让它运行:

java -jar 文件.jar

并设置其在计算机启动时运行,并以最高权限运行。

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.

南薇 2024-10-16 17:58:19

您想通过代码还是手动执行此操作?

但都是关于注册表的,为什么不检查 Java Service Wrapper 呢?

You wanna do this on code or manually ?

But is all about the Registry, why don't you check the Java Service Wrapper ?

淡紫姑娘! 2024-10-16 17:58:19

winsw 工作得非常好: http://kenai.com/projects/winsw

(不过需要 .NET)

winsw works very nicely: http://kenai.com/projects/winsw

(requires .NET though)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文