Problem reading a program argument containing \\\ and """

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: P4
    • 9
    • Affects Version/s: 8
    • Component/s: tools
    • None
    • other
    • windows_7

      The following program gives different results when run on Java 6 as compared to Java 8. See comments
      in the program for details.


      public class replTest
      {
        // When run on Windows 7, this program prints different results depending on which
        // version of Java is run. When run with build 1.6.0-b105 (hotspot server) the command
        //
        // java replTest \\\""1.8.0"\\\"
        //
        // prints the following: Input: \"1.8.0\"
        //
        // When run with build 1.8.0-ea-b57 (hotspot server) the same command gives a different result:
        //
        // Input: \""1.8.0\"
        //
        public static void main(String args[])
        {
            System.out.println("Input: " + args[0]);
        }
      }

            Assignee:
            Kumar Srinivasan
            Reporter:
            Harold Seigel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: