This document describes the most commonly used elements of a JNLP file. For a complete description of the format, refer to the specification. The JNLP file is an. JSR – Java™ Network Launching Protocol and API Specification v 1 Java(TM) Network Launching Protocol (JNLP) Specification. In computing, Java Web Start is a framework developed by Sun Microsystems ( now Oracle) that . jnlp spec=”+” codebase=”” href=””> Launch applet with Web Start Foo Bar.
|Published (Last):||22 May 2016|
|PDF File Size:||15.66 Mb|
|ePub File Size:||14.28 Mb|
|Price:||Free* [*Free Regsitration Required]|
These documentation pages are no longer current. They remain available for archival purposes.
How To – Java Web Start for Alma
The format used in this release is that specified in JSR This document describes the most commonly used elements of a Speclfication file. For a complete description of the format, refer to the specification. The spec attribute can be 1. An indicator as to what type of description this is, legal values are one-line, short, and tooltip.
Indicates that this speciication can operate when the client system is disconnected from the network. The shortcut element can be used to indicate an application’s preferences for desktop integration. Can be used to describe the application’s preference for creating a shortcut to run online or offline.
The optional install attribute can be used in a shortcut element to describe the application’s preference for being considered “installed”. If the value is “true” the application prefers to be considered installed. The default value of the install attribute is “false”.
On Windows, this determines if the application appears in the Add and Remove Programs panel. Can be used to indicate an application’s preference for putting a shortcut on the users desktop. Can be used to indicate an application’s preference for putting a menu item in the users start menus.
Can be used to hint to the JNLP client that it wishes to be registered with the operating system as the primary handler of certain extensions and a certain mime-type. If this element is included, either the offline-allowed element must also be included, or the href attribute must be set for the jnlp element. Contains a list of file extensions separated by spaces that the application requests it be registered to handle.
The update element is used to indicate the preferences for how application updates should be handled by the JNLP Client. It can be always, timeout, or background. Indicates the preference for how the JNLP Client should handle an application update when it is known an update is available before the application is launched. It can be always, prompt-update, or prompt-run.
Requests that the application be run with a permission set that meets the security specifications of the J2EE Application Client environment. Indicates an additional set of standard and non-standard virtual machine arguments that the application would prefer the JNLP Client to use when launching Java. Contains pointer to an additional component-desc or installer-desc to be used with this application. Can be used to indicated that all package names beginning with the given name, can be found in the given part.
Defines a system property that will be available through the System. A jnlp file must contain one of application-desc, applet-desc, component-desc, or installer-desc.
The name of the class containing the public static void main String method of the application. The name of the class containing the implementation of DownloadServiceListener, that may be used to indicate specfication progress. The example shows the basic outline of the document. The root element is jnlpwhich has four subelements: In addition, Java Web Start also supports launching applets by s;ecification the applet-desc element.
The elements are described in more detail below. This attribute must be 1. The default value is “1. Thus, it can typically be omitted. Note that this version supports both spec version spedification. This attribute contains a list of operating system names for this element.
Read the discussion of the resources element later for a full discussion of the os attribute. Contains a single attribute, hrefwhich is a URL locating the home page for the Application.
JNLP File Syntax
It is used by the Java Application Cache Viewer to point the user to a Web page where more information about the application can be found. A short statement about the application. Description elements are optional. The kind attribute defines how the description should be used.
It can have one of the following values:. Only one description element of each kind can be specified. A description element without a kind is used as a default value. Thus, if Java Web Start needs a description of kind shortand it is not specified in the JNLP file, then the text from the description without an attribute is used.
The icons are used to represents the application. A 64×64 icon is shown during download; in the Java Application Cache Viewer and in desktop shortcuts a 32×32 icon is used. Java Web Start automatically resizes an icon to the appropriate size. Optional width and height attributes can be used to indicate the size of the images. A JNLP file can contain multiple icon elements that differ by their kind attribute.
This enables you to specify different icon images for your application. The optional offline-allowed element indicates if the application can be launched offline.
If offline-allowed is specified, then the application can be launched offline by the Java Application Cache Specifcation, and shortcuts can be created which launch the application offline. The offline-allowed element also controls how Spceification Web Start checks for specifixation update to an application. If the element is not specified —i. And if an update is found, the new application will be downloaded and launched. Thus, it is guaranteed that the user always runs the latest version of the application.
The application, however, must be run online. If offline-allowed specificagion specifiedJava Web Start will also check to see if specificagion update jnpp available. However, if the application is already downloaded the check will speicfication after a few seconds, in which case the cached application will be launched instead.
Given a reasonably fast server connection, the latest version of the application will usually be run, but it is not guaranteed. The application, however, can be run offline. The secification shortcut element can be used to indicate an application’s preferences for desktop integration. The shortcut element can contain the optional online and install attributes, and speification two optional sub-elements, desktop and menu.
The optional association element is a hint to specificahion JNLP client that it knlp to be registered with the operating system as the primary handler of certain extensions and a certain mime-type. The association element must have the extensions and mime-type attributes. If the association element is included, either the offline-allowed element must also be included, or the href attribute must be set for the jnlp element to ensure that the application can be located and run.
The optional related-content element describes an additional piece of related content, such as a readme file, help pages, or links to registration pages, as a hint to a JNLP Client. The application is asking that this content be included in its desktop integration.
The related-content element has a mandatory href and title specifiication. It can contain any of the following two sub-elements:. Each sandbox application hnlp run in a restricted execution environment, similar to the Applet sandbox. The security element can be used to request unrestricted access. If the all-permissions element is jnll, the application has full access to the client machine and local network.
All JAR files must be signed. The user is prompted to accept the certificate and agree to run the application. The update element is used to indicate the preferences for how application updates should be handled by Java Web Start.
The check attribute indicates the preference for when the JNLP Client should check for updates, and can have one of the three values: A value of “timeout” default means to check for updates until timeout before launching the application. If the update check is not completed before the timeout, the application is launched, and the update check will continue in the background.
Java Web Start
A value of “background” means to launch the application while checking for updates in the background. The policy attribute indicates the preference for how the JNLP Client should handle an application update when it is known an update is available before the application is launched, and can have one of the following three values: The resources element is used to specify all the resources, such as Java class files, native libraries, and system properties, that are part of the application.
A resource definition can be restricted to a specific operating system, architecture, or locale using the osarchand locale attributes.
The os attribute contains a list of operating system names for a resource. For example, you could use multiple resources definitions, with different os attributes, to supply a native library for multiple operating systems.
The os attribute contains specificatio list of operating system names separated by spaces. Sspecification runtime, the os values are compared with the beginning of the os. For example, an os attribute value of “Windows” matches both “Windows Vista” unlp “Windows 7” operating systems. If you wish to list an operating system whose name contains a space, use a backslash to indicate that the space is part of the operating system name. The following example will specifically match “Windows Vista” and “Windows 7”:.
The resources element has six different possible subelements: The package and extension elements are not discussed in this developer’s guide. A jar element specifies a JAR file that is part of the application’s classpath.