制作安装程序并安装库(如果尚未安装)
我如何为我的 java 应用程序创建安装程序(jar 文件) 。与 Windows 安装程序相同,单击“下一步”继续安装应用程序。我的java应用程序想要的是,开源库xuggler要安装,如果它尚未存在于系统中。如果系统中尚不存在,我希望安装JRE。
如果用户没有安装xuggler或JRE,安装程序应该自动安装xuggler和JRE。或者它应该告诉用户从给定的 URL 获取该版本的库,然后继续。
How can i make up am installer for my java application (jar file) . The same as that of windows installer which proceeds by clicking next and installs the application. What i want with my java app is, the open source library xuggler to get installed if it is not already present in the system.Then i want JRE to get installed if it is not already present in the system.
If the user does not have xuggler or JRE installed , installer should automatically install the xuggler and JRE. Or it should tell the user to get that version of libraries from the given URL and then continue.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您的问题与此类似:
如何打包 java 应用程序
高级安装程序有一个单独的版本,专门用于为 Java 应用程序创建安装程序,因此这可能就是您正在寻找的版本。我会推荐其他工具,但由于它们是可编写脚本的,所以使用起来很麻烦,很多事情都可能出错。
希望这有帮助
Your question is similar to this one:
how to package a java application
Advanced Installer has a separate edition especially for creating installers for Java apps, so this might be what you are looking for. I would recommend other tools but since they're scriptable, they're a hassle to work with, lots of things can go wrong.
Hope this helps
如果你的应用程序。有 GUI,请使用 deployJava.js对于 JRE,然后 Java Web Start 安装/启动应用程序。
可以在 JNLP 文件中指定
installer-desc
来安装 Xuggle。 JWS可以在操作系统之间分区下载。JWS 由用于桌面 PC(例如运行 Mac OSX、*nix 或 Windows)的 J2SE JRE 制造商提供。
If your app. has a GUI, use deployJava.js for the JRE and then Java Web Start to install/launch the app.
An
installer-desc
can be specified in the JNLP file to install Xuggle. JWS can partition the download between OS.JWS is supplied by the makers of J2SE JREs for desktop PCs (e.g. running Mac OSX, *nix or Windows).
NullSoft 有一个非常好的可编写脚本的开源安装程序,称为 NSIS。
http://nsis.sourceforge.net/Main_Page
NullSoft have a very good scriptable, opensource installer called NSIS.
http://nsis.sourceforge.net/Main_Page
我不知道有跨平台的方法来做到这一点。在Windows世界中,您可以使用Wix生成MSI文件,并且在该文件中您可以指定JRE等依赖项。在 Linux 世界中,您可以生成一个包含包管理器读取的依赖项的文件,例如基于 Debian 的发行版的 deb 文件。单独设置这样的东西有点麻烦,但是一旦完成,您就可以将其集成到您的 ant 脚本中并自动构建所有内容。
I'm not aware of a cross platform way to do this. In the Windows world, you can use Wix to generate an MSI file, and in that file you can specify dependencies such as the JRE. In the Linux world you can generate a file with the dependencies read by the package manager, a deb file for Debian based releases for example. It's a bit of a faff to set things like this up separately, but once it's done you can just integrate it into your ant script and build everything automatically.