On Thu, 1 May 2025 20:27:01 GMT, Oleksii Sylichenko <d...@openjdk.org> wrote:

>> test/jdk/java/lang/ProcessBuilder/Basic.java line 1843:
>> 
>>> 1841:         
>>> //----------------------------------------------------------------
>>> 1842:         try {
>>> 1843:             String[] cmdp = Windows.is() ? new String[]{"cmd", "/c", 
>>> "echo."} : new String[]{"echo"};
>> 
>> Why the extra "." in the echo string?
>
> In Windows CMD, the `echo` command, when called without arguments, displays 
> the current state of the command echoing mode — either enabled (`ON`) or 
> disabled (`OFF`). For the case when this test is run from IntelliJ IDEA.
> 
> And the `echo.` command with the `.` works the same way as calling `echo` 
> without parameters in Unix — it outputs an empty line.
> 
> And to ensure that the `echo.` command is supported in Cygwin, we need to 
> invoke it via `cmd /c echo.`.

Is `echo.` shorthand for `echo.exe`; if so, please change to the long form to 
make it clearer the echo program is being run.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23933#discussion_r2070834029

Reply via email to