Skip to Main Content
Killer Game Programming in Java
book

Killer Game Programming in Java

by Andrew Davison
May 2005
Intermediate to advanced content levelIntermediate to advanced
998 pages
26h
English
O'Reilly Media, Inc.
Content preview from Killer Game Programming in Java

The JNLP Deployment File

A deployment file is written in XML and has a .jnlp extension. The file format is defined by the JNLP and API specifications (JSR-56) available from http://java.sun.com/products/javawebstart/download-spec.html. A subset is described in the developers guide in the J2SE documentation (see <JAVA_HOME>/docs/guide/jws/developersguide/contents.html).

Most JNLP files have a structure similar to Example B-1.

Example B-1. Structure of JNLP deployment file

    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+"
      codebase="http://www.foo.com/loc/"
      href="appl.jnlp" >
   
      <information> ... </information>
   
      <security> ... </security>
   
      <resources> ... </resources>
   
      <application-desc> ... </application-desc>
    </jnlp>

The codebase attribute gives the base URL where this file and the other application components are stored. A file:// location may be used instead if the software is to be loaded locally. The href attribute gives the URL reference for this JNLP file, which can be relative to the codebase (as in Example B-1) or can be an absolute address. The information tag contains textual information about the application, utilized by JWS at retrieval and execution time. For example, references to icons and a splash screen image are placed in this element.

The security tag is optional. If present, it defines the level of increased access given to the application. Two values are possible: <all-permissions/> or the slightly less powerful <j2ee-application-client-permissions/>. They require ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java Game Development with LibGDX: From Beginner to Professional

Java Game Development with LibGDX: From Beginner to Professional

Lee Stemkoski

Publisher Resources

ISBN: 0596007302Supplemental ContentErrata Page