jre包装并插入到Windows的可执行文件(EXE)

发布于 2025-01-26 12:39:57 字数 429 浏览 2 评论 0原文

我希望将我当前系统的JRE与我创建的Java(jar)应用程序打包。在Mac上,我可以简单地创建一个应用程序捆绑包并编写一个简单的脚本将两者连接在一起。在Windows上,我很难找到这样的简单解决方案。

我尝试了启动4J,但据我所知,这并不能让我在可执行文件中打包JRE;它必须保留为相对文件。

我尝试了EXE4J,但这也不能让我在EXE中打包JRE。

我的项目不使用模块,因此不清楚如何合并jpackage。

我想将文件(作为便携式非安装应用程序)分发给公司内部的人员。它们大多是计算机文盲,并且会看到两个文件(一个Exe,一个JRE)来害怕。

我也不想处理要求他们自己安装Java运行时的头痛,最终都会得到每个人的运行时间不同的人。简而言之,对于我来说,将JRE与JAR一起用作单个文件并将其交付给最终用户要容易得多。我们正在使用MAC分发来执行此操作,每个人都很高兴。

I wish to package both my current system's JRE with a Java (JAR) application that I have created. On Mac I can simply create an app bundle and write a simple script to wire the two together. On Windows I am having trouble finding such a simple solution.

I tried launch4j, but to the best of my knowledge this does not let me package the JRE inside the executable; it must remain as a relative file.

I tried exe4j, but this also does not let me package the JRE within the exe.

My project does not use modules, so unclear how I can incorporate jpackage.

I want to distribute the file (as a portable non-installed app) to people working within my company. They are mostly somewhat computer illiterate, and will be scared off by seeing TWO files (one exe, one JRE).

I also do not want to deal with the headache of asking them to install a java runtime themselves, and end up with everyone having some different runtime. Simply, it is much easier for me to package the JRE with the Jar together as a single file and deliver to the end-user. We are doing this with our mac distributions, and everyone is happy.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文