如何让 JNLP 下载正确版本的 JavaFX 2? [英] How to make JNLP download the correct version of JavaFX 2?

查看:30
本文介绍了如何让 JNLP 下载正确版本的 JavaFX 2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

JavaFX 2 高度依赖本机代码.对于我的桌面应用程序,我想为每个支持的操作系统选择最匹配的 JavaFX 风格,以尽可能轻松地在目标系统上安装.

JavaFX 2 is highly dependent on native code. For my desktop application, I would like to select the best-matching JavaFX flavor for each supported OS to make the installation on the target systems as painless as possible.

由于 JavaFX 2 附带了几个 Ant 任务来帮助部署,我认为这是要走的路,但我似乎陷入了死胡同.

Since JavaFX 2 comes with several Ant tasks to help with deployment, I thought this was the way to go, but I seem to have hit a dead end.

deploy 任务生成一个 JNLP 文件,其中包含调用 JavaFX 安装程序的资源引用:

The deploy task generates a JNLP file which includes a resource reference that calls the JavaFX installer:

 <resources>
    <jfx:javafx-runtime version="2.1+" ref="http://javadl.sun.com/webapps/download/GetFile/javafx-latest/windows-i586/javafx2.jnlp"/>
 </resources>

这显然不适用于 Windows 以外的操作系统,甚至可能是 32 位 Windows.根据 JNLP 文档,但是可以选择依赖于操作系统的资源:

This obviously won't work on OSs other than Windows, possibly even 32-bit Windows. According to the JNLP doc, OS-dependent resource selection is possible, though:

<resources os="SunOS" arch="sparc">
   ...
</resources>

但是,我无法弄清楚不同平台的 URL.他们在某处记录了吗?还有其他方法可以达到我的目标吗?

However, I can't figure out the URLs for the different platforms. Are they documented somewhere? Is there another way to reach my goal?

请注意,已经有一个 类似的问题,但它仅限于问题的 32/64 位部分,因此没有得到解答.

Please note that there already is a similar question, but it limits itself to the 32/64-bit part of the issue and goes unanswered at that.

推荐答案

Jnlp 和插件模式仅在当前 JavaFX 2.1 中的 Windows 上支持

Jnlp and plugin modes are supported only on Windows in current JavaFX 2.1

Mac/Linux 运行时计划在 2.2 版本中添加.您可以尝试开发预览包:http://www.oracle.com/technetwork/java/javafx/downloads/devpreview-1429449.html

Mac/Linux runtime is planned to be added in 2.2 release. You can try development preview bundles: http://www.oracle.com/technetwork/java/javafx/downloads/devpreview-1429449.html

这篇关于如何让 JNLP 下载正确版本的 JavaFX 2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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