Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 772
Urs Reupke Avatar asked May 02 '12 11:05

Urs Reupke


1 Answers

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

like image 174
Sergey Grinev Avatar answered Nov 01 '22 17:11

Sergey Grinev