How to make JNLP download the correct version of JavaFX 2?

余生颓废 提交于 2020-01-02 04:00:08

问题


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.

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.

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>

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>

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

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.


回答1:


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

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



来源:https://stackoverflow.com/questions/10413136/how-to-make-jnlp-download-the-correct-version-of-javafx-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!