Java Reference
In-Depth Information
JRE
It is also possible to define the JRE intended for that application elements within a resources
element.
The jnlp element might have three different attributes:
version . Describes the J2SE JRE versions suited for the application to be launched.
initial-heap-size .Instructs the JNLP Client on the initial JVM heap size.
max-heap-size .Indicates the maximum JVM heap size.
Another feature regarding the jnlp element is that it can contain nested resources elements.
However, the nesting is considered by JNLP Clients only at its first iteration. Further nested
resources elements are ignored. This behavior is shown in Listing 10.6.
L ISTING 10.6 Example of Nested Resources in a j2se Element
<?xml version=”1.0” encoding=”UTF-8”?>
<jnlp spec=”1.0+”
codebase=”http://server/b2/c10/”
href=”nestedres.jnlp”>
<information>
<title>Example Of Nested Resources JNLP File</title>
<vendor>Mauro's Workshop</vendor>
</information>
<resources>
<j2se version=”1.3 1.2.1 1.4*” />
<resources>
<jar href=”lazyeditor/draw-module.jar” download=”eager”/>
</resources>
<jar href=”lazyeditor/lazyeditor.jar” />
<jar href=”sec-test.jar” download=”lazy”/>
</resources>
<application-desc/>
</jnlp>
JRE String Identification
Often, programmers need to specify which JRE their application is intended to run, both in the
Java platform version and also for their own resources.
10
There are two ways of specifying JREs with JNLP. The first is to identify a given platform ver-
sion, like this:
<j2se version=”1.4”/>
Search WWH ::




Custom Search