Java Platform, Standard Edition Deployment Guide
Contents    Previous    Next

17 Signed JNLP Files

This topic describes signed JNLP files and JNLP templates. A signed JNLP file is a JNLP file that is included in a signed JAR file before the JAR file is signed. A JNLP template defines the parts of an external JNLP file that can differ from the one embedded in a JAR file.

This topic contains the following sections:

17.2 Signing a JAR File with a JNLP Template

A JNLP file can be signed to grant special privileges to a JAR-bundled application. When deploying a signed application from a location that is unlikely to change, and other aspects of the deployment are stable, you can use a standard JNLP file, as described in Signing and Verifying Jar Files in the Java Tutorial.

However, when an application needs to be re-distributed, or other tweaks are needed, such as changing the application icon, you can deploy the application with a JNLP template. Introduced in JDK 7, a template can define the parts of an external JNLP file that can differ from the one embedded in a JAR file.

A template file has the name JNLP-INF/APPLICATION_TEMPLATE.JNLP. The name must be in upper case. For those element or attribute fields in the file that are to be left unspecified, the wildcard notation, *, is used as that field's value. Elements or attributes that might compromise security are locked out from this feature.

Example 17-1 shows an application template that could be used to host an application on various hosts with different application icons.

An application with this text in a JNLP-INF/APPLICATION_TEMPLATE.JNLP file in its main JAR file can be moved from one server to another, or its application icon can be changed, without resigning the main JAR file.

For more information, see Version 7.0 of the JNLP specification (

Contents    Previous    Next

Copyright © 1993, 2017, Oracle and/or its affiliates. All rights reserved.