如何打包Java桌面应用程序? [英] How can I package a Java desktop application?

查看:161
本文介绍了如何打包Java桌面应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个简单的桌面java应用程序。我想尽可能无缝地为最终用户安装。例如。类似于Minecraft的分布方式 - OS X的简单可执行文件和Windows的EXE文件。

I am working on a simple desktop java application. I would like to make it as seamless to install for end users as possible. E.g. similar to how Minecraft is distributed - a simple executable for OS X and an EXE file for Windows.

我应该使用什么工具?

推荐答案

Aaah!我也有这个问题。您的Java应用的用户必须安装JRE 才能运行它。

您可以告诉他们先安装Java,或者使用您的应用分发JRE ,如处理所做的那样。

但请注意,您的打包程序会很重如果你包含JRE。而且,如果你想这样做,用户将需要为他们的平台下载适当的包。

Aaah! I also had that question. Users of your Java app must have the JRE installed in order to run it.
You can either tell them to install Java first, or distribute JRE with your app, as Processing does.
Note, however, that your packaged program will be heavy if you include JRE with it. And, if you want to do that, users will need to download the appropiate package for their platform.

他们将您的Java应用程序作为输入,并将 wrap 包装在可执行文件中(对于指定的平台)。您可以根据需要自定义它们;
如果用户没有安装Java,下载页面将会打开。

They take your Java app as input and wrap them in an executable (for a specified platform). You can customize them as you like; and if the user doesn't have Java installed, the download page will open.

一些例子是 Launch4J JSmooth Jar2EXE

 

Some examples are Launch4J, JSmooth and Jar2EXE.
 

它们是配置为将应用程序文件复制到用户计算机的独立应用程序,并(可选)创建快捷方式。

They are independent applications configured to copy your app files to the user's computer and (optionally) create a shortcut.

有些安装程序是用Java编写的,所以它们是多平台的。在这种情况下,安装程序是 .jar

其他一些是依赖于平台的,但是你的优点是你不需要包装它们。

Some installers are written in Java, so they're multiplatform. In this case, the installer is a .jar.
Some others are platform-dependent, but you have the advantage that you don't need to wrap them.

Java安装程序: IzPack Packlet PackJacket Antigen ,…

 

Java installers: IzPack, Packlet, PackJacket, Antigen, …
 

这是一项Java功能,允许用户轻松运行您的应用程序。你给他们一个 .jnpl 文件,他们打开它的
,Java下载你应用程序的最新版本并运行它。没有包装麻烦!

It's a Java feature that allows you users to easily run your apps. You give them a .jnpl file,
they open it, and Java downloads the latest version of your app and runs it. No packaging troubles!

查看完整的资源列表这里

这篇关于如何打包Java桌面应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆