On Sat, 3 May 2025 12:44:08 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"}; >> >> A future maintainer without intimate familiarity with Windows commands and >> syntax would probably appreciate a short comment explaining the command >> chosen. > > Would a comment with the following text be sufficient: > > In Windows CMD (`cmd.exe`), `echo/` outputs a newline (i.e., an empty line). > Wrapping it with `cmd.exe /c` ensures compatibility in both native Windows > and Cygwin environments. Thanks, sounds fine to me! (Although I’m not an expert in the field, which is also why I thought a comment would be a nice addition here) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23933#discussion_r2072388535