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

(process) Runtime.exec(String) fails if command contains spaces [win]

    XMLWordPrintable

Details

    • b91
    • Verified

    Backports

      Description

        FULL PRODUCT VERSION :
        1.7.0_21 64 bit

        ADDITIONAL OS VERSION INFORMATION :
        Windows 7 [Version 6.1.7601]

        A DESCRIPTION OF THE PROBLEM :
        Process p = exec( " F:\\Program Files\
        etload\
        etload.exe " );
        fails
        The command works fine from the command line, or in 1.7.0_17

        However
        Process p = exec( " E:\\sys\
        etload.exe " );

        works fine in 1.7.0_21 if I put a copy of netload.exe in E:\sys

        exec no longer likes spaces in filenames.

        REGRESSION. Last worked in version 7u17

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        put snippets in a dummy program. Run them both ways with some exe that does exist on your Windows machine.

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        Should work either way
        ACTUAL -
        Only exe without space in filenames can be execed.


        REPRODUCIBILITY :
        This bug can be reproduced always.

        CUSTOMER SUBMITTED WORKAROUND :
        move files to directories without spaces in the names.

        Attachments

          Issue Links

            Activity

              People

                uta Alexey Utkin (Inactive)
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: