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

(process) zero length Process arguments ignored on win32

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 2.0, 6, 6u24
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Understanding:
      Cause Known
    • CPU:
      generic, x86, sparc
    • OS:
      generic, solaris_1, windows_7

      Description

      For win32, it appears that java.lang.ProcessImpl is not performing quotation correctly for an argument of length zero. This affects the <java> target in ant when empty command line arguments are passed in. I have attached a short sample test that is runnable from ant. It calls a simple Java class and passes in some arguments. On unix, both tests pass, but on windows, it fails:

      ** fork=false **
      Pass:
      argument 0: "argument0"
      argument 1: ""
      argument 2: "argument2"

      ** fork=true **
      Fail. Only received 2 args:
      argument 0: "argument0"
      argument 1: "argument2"

      I don't think this is an ant issue, as it does not appear that ant converts all the arguments into a single string (as it would be on a command line).
      Adding Kohsuke to the interest list since he did the detective work to narrow down the issue.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                duke J. Duke (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Imported:
                  Indexed: