jsr-56 - Java Community Process Program
jsr-56 - Java Community Process Program
jsr-56 - Java Community Process Program
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
3.7.1 COMPONENT EXTENSION<br />
A JNLP file is a component extension if the component-desc element is specified. A component<br />
extension is typically used to factor out a set of resources that are shared between a large set applications.<br />
For example, this could be a toolkit for XML parsing. The following shows a sample JNLP fragment that<br />
specifies a component descriptor:<br />
<br />
...<br />
<br />
<br />
<br />
...<br />
<br />
<br />
<br />
No j2se elements can be specified as part of the resources. Section 4 describes how these resources<br />
become part of the application that uses the extension.<br />
An extension descriptor is downloaded using the extension download protocol described in Section 6.4.<br />
3.7.2 INSTALLER EXTENSION<br />
A JNLP file is an installer extension if the installer-desc element is specified. It describes an application<br />
that is executed only once, the first time the JNLP file is used on the local system. The following shows a<br />
sample JNLP fragment that specifies an installer descriptor:<br />
<br />
...<br />
<br />
<br />
<br />
...<br />
<br />
<br />
<br />
main-class attribute: The name of the class containing the public static void<br />
main(String[]) method of an installer/uninstaller for this extension. This attribute can be omitted if<br />
the main class can be found from the Main-Class manifest entry in the main JAR file. This is described<br />
in detail in Section 5.2.<br />
The installer extension is intended to install platform-specific native code that requires a more<br />
complicated setup than simply loading a native library into the JVM, such as installing a JRE or device<br />
driver. The installer executed by the JNLP Client must be a <strong>Java</strong> Technology-based application. Note that<br />
this does not limit the kind of code that can be installed or executed. For example, the installer could be a<br />
thin wrapper that executes a traditional native installer, executes a shell script, or unzips a ZIP file with<br />
native code onto the disk.<br />
The installer communicates with the JNLP Client using the ExtensionInstallerService (see<br />
section 7.8 for details). Using this service, the installer informs the JNLP Client what native libraries<br />
JSR-<strong>56</strong> - Proposed Final Draft 20 of 74