windows 如何创建将安装可执行 Jar 的安装文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12735013/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to create a setup file that will install an executable Jar
提问by Jabda
I've created a Java application in Eclipse JavaEE on Windows (yay for me!!) and I compiled it into an executable jar. I created a .bat file that runs that jar. I put that all into a folder system with the required images and libraries to run my program successfully.
我在 Windows 上的 Eclipse JavaEE 中创建了一个 Java 应用程序(对我来说是的!!),我将它编译成一个可执行的 jar。我创建了一个运行该 jar 的 .bat 文件。我将所有这些都放入一个文件夹系统,其中包含成功运行我的程序所需的图像和库。
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. 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??
我只需单击 bat 文件就可以了,但我希望我的用户能够看到开始菜单中显示的程序,并从那里启动它。我正在考虑创建一个 setup.exe 来处理安装,但不确定如何(iexpress.exe 适用于 .exe 程序)我真的不需要 setup.exe 只需将程序添加到开始菜单就足够了指向它的bat文件,但是如何?
采纳答案by jpm
回答by fvu
There are a couple of installer generators that either support Java applications, or are specifically designed to create installers for Java programs. Of the latter category IzPackis one of the better known. 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.
有几个安装程序生成器支持 Java 应用程序,或者专门设计用于为 Java 程序创建安装程序。在后一类中,IzPack是较为知名的一种。我从来没有用 IzPack 开发过安装程序,所以我不能向您提供开发人员的观点,但我遇到了几个使用 IzPack 的软件包(请参阅他们的参考资料),并且生成的安装程序非常好。

