FX XML extension

When using the JNLP, you create a JNLP file. Here is an example:

    <?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="" href="">
<information>
<title>Sample/title>
<vendor>The Sample Vendor</vendor>
<icon href="sample-icon.jpg"/>
<offline-allowed/>
</information>
<resources>
<!-- Application Resources -->
<j2se version="1.6+"
href="http://java.sun.com/products/autodl/j2se"/>
<jar href="Sample-Set.jar" main="true" />
</resources>
<application-desc
name="Sample Application"
main-class="com.vendor.SampleApplication"
width="800"
height="500">
<argument>Arg1</argument>
<argument>Arg2</argument>
<argument>Arg3</argument>
</application-desc>
<update check="background"/>
</jnlp>

Two changes have been made to the <application-desc> element. First, the optional type attribute has been added so the type of application can be annotated. The default type is Java, so if your program is a Java app, you need not include the type attribute. Alternatively, you can specify Java as your type as follows:

    <application-desc 
name="Another Sample Application"
type="Java" main-class="com.vendor.SampleApplication2"
width="800"
height="500">
<argument>Arg1</argument>
<argument>Arg2</argument>
<argument>Arg3</argument>
</application-desc>

We can indicate other application types to include JavaFX as shown here:

    <application-desc 
name="A Great JavaFX Application"
type="JavaFX" main-class="com.vendor.GreatJavaFXApplication"
width="800"
height="500">
<argument>Arg1</argument>
<argument>Arg2</argument>
<argument>Arg3</argument>
</application-desc>
If you indicate an application type that is not supported by the JNLP client, your application launch will fail. For more information about JNLP, you can consult the official documentation: http://docs.oracle.com/javase/7/docs/technotes/guides/javaws/developersguide/faq.html.

The second change to the <application-desc> element in Java 9 is the addition of the param sub-element. This allows us to provide the name of parameters along with their value using the value attribute. Here is an example of how an <application-desc> element of a JNLP file looks with the param sub-element and the value attribute included. This example shows three sets of parameters:

    <application-desc
name="My JRuby Application"
type="JRuby"
main-class="com.vendor.JRubyApplication"
width="800"
height="500">
<argument>Arg1</argument>
<argument>Arg2</argument>
<argument>Arg3</argument>
<param name="Parameter1" value="Value1"/>
<param name="Parameter2" value="Value2"/>
<param name="Parameter3" value="Value3"/>
</application-desc>
If the application type is Java, then any param sub-elements you use will be ignored.