gpt4 book ai didi

java - 在不同的操作系统上发布 Java 应用程序

转载 作者:行者123 更新时间:2023-12-04 07:04:50 26 4
gpt4 key购买 nike

我有一个 Java 应用程序,我想将它作为 exe 或 dwg 等发布,以便不同平台上的用户可以双击它并开始运行。
但是为了让我的代码工作得非常好,我需要它作为 Windows 服务工作,以及其他操作系统中的任何等价物。
使用 Java web start 不是一个解决方案,因为据我所知,如果客户端机器关闭,那么用户将不得不再次双击 exe。
我已经尝试过 java 服务包装器,但我看不到如何使它可发布。

谢谢
普拉纳贝什

最佳答案

如果您可以接受商业工具,我会推荐 install4j .它可以为最常见的平台生成安装程序,专门支持将应用程序安装为服务。

引自他们的 Features page :

install4j offers full support for generating and installing services (daemons). For services, install4j generates service executables on Windows, startup items on Mac OS X and start/stop scripts on Unix/Linux platforms.

关于java - 在不同的操作系统上发布 Java 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1270049/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com