简体   繁体   English

如何创建将安装可执行Jar的安装文件

[英]How to create a setup file that will install an executable Jar

I've created a Java application in Eclipse JavaEE on Windows (yay for me!!) and I compiled it into an executable jar. 我已经在Windows上的Eclipse JavaEE中创建了Java应用程序(对我来说是!!),并将其编译为可执行jar。 I created a .bat file that runs that jar. 我创建了一个运行该jar的.bat文件。 I put that all into a folder system with the required images and libraries to run my program successfully. 我将它们全部放入具有所需图像和库的文件夹系统中,以成功运行程序。

Now I want to install this onto other computers. 现在,我想将此安装到其他计算机上。

I am OK with just clicking the bat file but I want my users to be able to see the program displayed in the startmenu, and launch it from there. 我只需单击bat文件就可以了,但是我希望我的用户能够看到显示在开始菜单中的程序,然后从那里启动它。 I am thinking of creating a setup.exe to handle the installation, but not sure how (iexpress.exe works for .exe programs) I don't really need the setup.exe it would suffice to just add program to the start menu and point it the bat file, but how?? 我正在考虑创建一个setup.exe来处理安装,但是不确定如何运行(iexpress.exe适用于.exe程序)我真的不需要setup.exe,只需将程序添加到开始菜单中就可以了,指向蝙蝠文件,但如何?

Take a look at the NSIS tool. 看一下NSIS工具。 A fairly powerful, scriptable, installer creation system with a very manageable learning curve. 一个功能强大,可编写脚本的安装程序创建系统,具有非常易于管理的学习曲线。

There are a couple of installer generators that either support Java applications, or are specifically designed to create installers for Java programs. 有几个安装程序生成器,它们要么支持Java应用程序,要么专门设计用于创建Java程序的安装程序。 Of the latter category IzPack is one of the better known. 在后一类中, IzPack是最知名的一种。 I've never developed an installer with IzPack so I cannot offer you a developer perspective but I've encountered several software packages that use IzPack (see their references ), and the generated installers are very nice. 我从未使用IzPack开发安装程序,因此无法向您提供开发人员的观点,但是我遇到了几个使用IzPack的软件包(请参见参考资料 ),并且生成的安装程序非常好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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