是时候部署它了,因此我需要将其转换为 exe。
这两种说法放在一起没有意义。我们无法部署 Swing 桌面应用程序。*nix 或 OS X 使用基于 Windows 的可执行文件。部署 Java 桌面应用程序的最佳选择。通常来自使用Java Web Start的网页上的链接。
来自BlueCove 文档:安装:
安装
BlueCove 依赖于您的操作系统或蓝牙 USB 设备随附的已安装的本机蓝牙堆栈。
Installation of the binary (already compiled) version of BlueCove is as follows:
- Download BlueCove binary release
- Add
bluecove.jar
to your classpath
- Also add
bluecove-gpl.jar
to your classpath if you are running application on Linux
This would imply something like the following. 2 Java Web Start based JNLP extensions:
- An extension for the BlueCove main API (
bluecove.jar
) to support Windows and OS X, as well as the core classes needed for Linux. This 'main' JNLP file would have a resources section specific to Linux, which in turn references the 'Linux only' extension JNLP.
- An extension for the Linux specific API (
bluecove-gpl.jar
) which includes an installer element to pop a license prompt for the user (if needed, this entire extension is necessary only for producing a license prompt). Here is a small demo. of the ExtensionInstallerService
that would show a license agreement.
..would this require the user to always have an internet connection when using the application, or is it just the first time activation that requires internet?
The Java Web Start client (the app. that launches an appropriate JVM and your app.) would typically check back with the home server for updates to the application Jars relevant to that OS. Fortunately it is configurable as to when and how the check is done, and whether the application can be run 'off-line' as you require, by specifying an element in the JNLP:
<offline-allowed />
The offline-allowed
element (part of the jnlp
element) ensures that after initial installation, the app. can be used off-line.