Java Reference
In-Depth Information
The <application-desc> contains a main-class attribute that points to the main
JavaFX class, and may have zero or more <argument> elements for passing the
equivalent of command-line arguments to the JavaFX application. Listing 9.18
shows an example <application-desc> section.
Listing 9.18
JNLP - <application-desc>
< application-desc main-class="nasaimagebrowser.Main">
<argument>arg1</argument>
</application-desc>
Except for swapping out the <applet-desc> section for the <application-
desc> section, the JNLP deployment file for applets is identical to the one for
applications. Using the NASABrowserImage application, the Java Web Start JNLP
file is shown in Listing 9.19.
Listing 9.19
JNLP Deployment File for Java Web Start Application
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" href="NasaImageBrowser_browser.jnlp">
<information>
<title>NasaImageBrowser</title>
<vendor>jclarke</vendor>
<homepage href="http://www.jfxbook.com"/>
<description>NasaImageBrowser</description>
<offline-allowed/>
<shortcut>
<desktop/>
</shortcut>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.5+"/>
<property name="jnlp.packEnabled" value="true"/>
<property name="jnlp.versionEnabled" value="true"/>
<extension name="JavaFX Runtime"
href="http://dl.javafx.com/javafx-rt.jnlp"/>
<jar href="NasaImageBrowser.jar" main="true"/>
</resources>
<application-desc main-class="nasaimagebrowser.Main"/>
</jnlp>
 
Search WWH ::




Custom Search