Name: aaR10142 Date: 02/12/2001
The jnlp spec says:
"
Properties must be processed in the order specified in the JNLP file. Thus, if two properties define different values for the same property, then the last value specified in the JNLP file is used. For example, given the following two declarations, n the given order:
<property name="key" value="overwritten"/>
<property name="key" value="used"/>
Then the property key will have the value used.
"
But the javaws does not follow this doc and uses "overwritten" value.
See example
------------- test.jnlp ----------
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="0.2+" version="1.0"
codebase="http://falcon:12345">
<information>
<title>Test</title>
<vendor>Sun Microsystems, Inc.</vendor>
<homepage href="index.html"/>
<description>Test</description>
</information>
<resources>
<j2se version="1.3 1.2"/>
<jar href="main.jar"/>
<property name="key" value="overwritten"/>
<property name="key" value="used"/>
</resources>
<application-desc main-class="Main">
</application-desc>
</jnlp>
--------------Test.java----------------
import java.awt.Frame;
import java.awt.Label;
public class Main {
public static void main(String[] args) {
String propValue = System.getProperty("key");
Frame f = new Frame("Test");
f.add(new Label("Property value: " + propValue));
f.setSize(300, 100);
f.setVisible(true);
}
}
------------------- OUTPUT ------------
Property value: overwritten
======================================================================