Java Reference
In-Depth Information
LISTING 14.1
The Full Text of PageData.jnlp
1: <?xml version=”1.0” encoding=”utf-8”?>
2: <!— JNLP File for the PageData Application —>
3: <jnlp
4: codebase=”http://www.cadenhead.org/book/java-21-days/java”
5: href=”PageData.jnlp”>
6: <information>
7: <title>PageData Application</title>
8: <vendor>Rogers Cadenhead</vendor>
9: <homepage href=”http://www.java21days.com”/>
10: <icon href=”pagedataicon.gif”/>
11: <offline-allowed/>
12: </information>
13: <resources>
14: <j2se version=”1.6”/>
15: <jar href=”PageData.jar”/>
16: </resources>
17: <security>
18: <all-permissions/>
19: </security>
20: <application-desc main-class=”PageData”/>
21: </jnlp>
The structure of a JNLP file is similar to the Hypertext Markup Language (HTML)
required to put a Java applet on a web page. Everything within the < and > marks is a
tag, and tags are placed around the information the tag describes. There's an opening tag
before the information and a closing tag after it.
For example, line 7 of Listing 14.1 contains the following text:
<title>PageData Application</title>
In order from left to right, this line contains the opening tag <title> , the text PageData
Application , and the closing tag </title> . The text between the tags, “PageData
Application,” is the title of the application. This title will be displayed by Java Web Start
as the application is being loaded and used in menus and shortcuts.
The difference between opening tags and closing tags is that closing tags begin with a
slash ( / ) character, and opening tags do not. In line 8, <vendor> is the opening tag,
</vendor> is the closing tag, and these tags surround the name of the vendor who cre-
ated the application. I've used my name here. Delete it and replace it with your own
name, taking care not to alter the <vendor> or </vendor> tags around it.
14
 
Search WWH ::




Custom Search