Java Reference
In-Depth Information
F The JNLP file—this file is also generated by the packaging step. The JNLP file contains
descriptors for the deployment of the applet on the Web. It also contains directives
for the applet's runtime, JAR dependency, and, if the applet is installed as a desktop
application using the drag-to-install feature, the JNLP file contains directives for
desktop behaviors (see Deploying your applet for drag-to-install ).
There's more...
The JavaScript library that loads the applet on the page does more than what is listed above.
It also provides the following services:
F JRE detection —the code will attempt to launch the proper JRE version capable of
supporting the features of the new Java Plugin. It is also possible to detect a specific
version of the JRE on the client's machine to run the application.
F Graceful degradation —the JavaScript attempts to gracefully fall back to a version of
the JRE that can still execute the code.
F Generate HTML tags —the script generates the proper HTML tags ( <object> ,
<embed> , or <applet> ) to embed the code passing in the necessary attributes
and parameters to the tags.
Overriding the JNLP file name
By default, the bootstrap JavaScript will look for a JNLP file name {APP_NAME}_browser.
jnlp , where APP_NAME is the application name specified during the build. However, you can
override the default JNLP file name in the bootstrap JavaScript as follows:
<script>
javafx(
{
archive: "applet-demo.jar",
width: 640,
height: 75,
code: "applet.demo.Main",
name: "applet-demo"
jnlp_href: "myapplet.jnlp"
}
);
</script>
Using the jnlp_href parameter, you can specify an arbitrary file name for your applet's JNLP.
Ensure, however, that the href attribute inside the JNLP file (in the </jnlp> tag) matches
the value specified with jnlp_ref , otherwise this will fail.
You can find out more about JNLP a nd Web Start at http://java.sun.com/javase/
technologies/desktop/javawebstart/ .
 
Search WWH ::




Custom Search