Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4414214

JaWS doesn't process properties in the order specified in the JNLP file.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 1.0.1
    • Fix Version/s: 1.0.1
    • Component/s: deploy
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      1.0.1
    • CPU:
      sparc
    • OS:
      solaris_2.6
    • Verification:
      Verified

      Description



      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


      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              herrick Andy Herrick
              Reporter:
              alisunw Ali Ali (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: