Java Reference
In-Depth Information
In Listing 14.1, the attributes indicate that the application's JNLP file is at the following
web address:
http://www.cadenhead.org/book/java-21-days/java/PageData.jnlp
The information element (lines 6-12) defines information about the application.
Elements can contain other elements in XML, and in Listing 14.1, the information ele-
ment contains title , vendor , homepage , icon , and offline-allowed tags.
The title , vendor , homepage , and offline-allowed elements were described earlier.
The icon element (line 10) contains an href attribute that indicates the name (or folder
location and name) of the program's icon. Like all file references in a JNLP file, this ele-
ment uses the codebase attribute to determine the full URL of the resource. In this exam-
ple, the icon element's href attribute is pagedataicon.gif , and the codebase is http://
www.cadenhead.org/book/java21days/java, so the icon file is at the following web
address:
http://www.cadenhead.org/book/java21days/java/pagedataicon.gif
The resources element (lines 13-16) defines resources used by the application when it
runs.
The j2se element has a version attribute that indicates the version of the Java inter-
preter that should run the application. This attribute can specify a general version (such
as “1.5” , or “1.6” ), a specific version (such as “1.6.1-beta” ), or a reference to multiple
versions—follow a general version number with a plus sign. The tag <j2se ver-
sion=”1.4+”> sets up an application to be run by any Java interpreter from version 1.4
upward.
When you're using the j2se element to specify multiple versions,
Java Web Start will not use a beta version to run an application.
The only way to run an application with a beta release is to indi-
cate that release specifically.
NOTE
The jar element has an href attribute that specifies the application's JAR file. This
attribute can be a filename or a reference to a folder and filename, and it uses codebase .
In the PageData example, the JAR file is in http://www.cadenhead.org/book/java21days/
java/PageData.jar.
14
The application-desc element indicates the application's main class file and any argu-
ments that should be used when that class is executed.
Search WWH ::




Custom Search