Java Web Start 在 Windows 启动时部署
我有一个 Java 应用程序,我将开始使用 Web Start 来部署它。但一个新的需求让我重新思考这一点,因为我现在需要添加一项功能,允许最终用户选择是否要在启动时运行该程序(Windows 的,而不是跨平台的) )。但我仍然想避免将其作为服务运行。有没有什么方法可以使用 Web Start 来完成此任务,或者我应该探索其他选项来部署它?提前致谢。
I have a Java application that I'm about to begin to use Web Start to deploy. But a new demand has made me rethink this, as I'm now required to add a piece of functionality that allows the end user to select whether or not they'd like to run this program on startup (of Windows, not cross-platform). But I'd still like to shy away from making this run as a service. Is there any way that this can be accomplished using Web Start, or should I explore other options to deploy this? Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
实际上,将 this 放入 jnlp 文件中是可行的:
但这仍然只适用于英文 Windows 版本。我认为德语是“Autostart”,西班牙语是“Iniciar”。因此,它会引起与通过 IntegrationService 的方式基本上相同的头痛。
It actually works to put a this in the jnlp-file:
But that still would only work with English windows versions. German is "Autostart", Spanish was "Iniciar" I think. So it causes basically the same headache as the way via the IntegrationService.
我还没有尝试过,但我想知道您是否可以使用新的 JNLP IntegrationService 与 javaws 命令行结合使用程序。这个想法是以编程方式在 Windows 启动组中创建快捷方式(尽管该位置取决于特定的 Windows 版本)。
I have not tried it, but I wonder if you could use the new JNLP IntegrationService in combination with the javaws command line program. The idea being to programmatically create a shortcut in the Windows startup group (although that location is dependent on specific Windows version).
要解决启动文件夹的语言问题,只需使用注册表即可。这是一些应该可以工作的代码。这会调用 reg.exe 来更改注册表。
To get around the language problem for the Startup folder just use the registry. Here is some code that should work. This calls reg.exe to make registry changes.