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

JaWS 1.2 trims argument leading and trailing whitespaces

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.2.0
    • Component/s: deploy
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      1.2
    • CPU:
      sparc
    • OS:
      solaris_7
    • Verification:
      Verified

      Backports

        Description



        Name: aaR10142 Date: 03/28/2002



        The JaWS 1.0.1 allows to pass to application arguments with leading or trailing whitespaces. JaWS 1.2 trims they. See example.
        So there is no way to pass such arguments to an application now.
        This breaks comparability and is not specified in the specification
          


        Example:
        --------------- Test.java ----------------

        import javax.swing.*;

        public class Test {
            public static void main(String[] args) {

        JFrame f = new JFrame("Test");
        f.getContentPane().add (new JLabel("arg0 = \"" + args[0] + "\""));
        f.setSize(200, 100);
                f.setVisible(true);
            }
        }


        ---------------------- test.jnlp ------------------
        <jnlp spec="1.0" codebase="http://matmech:8080/test/ali/" href="test.jnlp">
          <information>
             <title>Test</title>
            <vendor>Sun Microsystems, Inc.</vendor>
            <homepage href="index.html"/>
            <description>Test</description>
          </information>
          <resources>
            <j2se version="1.4"/>
            <jar href="test.jar"/>
          </resources>
          <application-desc main-class="Test">
            <argument> test with witespaces </argument>
          </application-desc>
          <application-desc main-class="Draw"/>
        </jnlp>



        ----------------------------------------------------

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

          Attachments

            Issue Links

              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: