简体   繁体   中英

How to bundle jre with .exe file created from .jar

我从.jar文件创建了.exe文件,现在我的客户要求运行该应用程序而不在系统中安装jre。我听说捆绑jre是可能的...但是我不知道如何将jre与.exe文件捆绑在一起..

I have used VMware ThinApp to do exactly what you are trying to do. It does cost money, but works extremely well. It allows you to roll up all the dependencies your application uses into a single executable that can then run on vanilla installations of Windows. It can be used for a lot more than just Java, and it does so by recording the changes you make to a system after installing your application + the JRE for example, and then wraps up all of those changes. It certainly simplifies application deployment, since the applications are now portable. I've even used it to roll up Visual C++ redistributables, and .NET as well. This certainly increases the size of the executable, but it's also convenient knowing the application will run successfully. See more info at http://www.vmware.com/products/thinapp/overview.html .

The open source Launch4j allows you to produce an exe with an embedded JRE. This SO article also discusses this topic. Caveat: I've had very good success with Launch4j, but never used the embedded JRE feature.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM