On Thu, 21 May 2026 23:22:19 GMT, Ashay Rane <[email protected]> wrote:

> I need to trace the call from `ProcessBuilder.start()` to 
> [`processCreate()`](https://github.com/openjdk/jdk/blob/master/src/java.base/windows/native/libjava/ProcessImpl_md.c#L340)
>  in ProcessImpl_md.c to see where the prefix is getting stripped. Let me know 
> if you think we should fix that first before proceeding further on this patch.

The "\?" prefix is PITA to have to deal with. The file system provider will add 
the prefix is required when doing file I/O but it doesn't expose in the String 
representation, meaning Path::toString will not return a String with this 
prefix. When you have relative paths that are really long then you'll see the 
rational for this long standing policy. 

Since JDK 21, Path.of(String) will accept a file path that has the prefix, it 
will be dropped of course when parsing and normalizing the input. Being liberal 
on what you accept here is allow for file paths that come from native programs.

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

PR Comment: https://git.openjdk.org/jdk/pull/31209#issuecomment-4517658108

Reply via email to