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

JaWS 1.2 trims argument leading and trailing whitespaces

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.2.0
    • 1.2.0
    • deploy
    • 1.2
    • sparc
    • solaris_7
    • Verified



        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>



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

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

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

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: