RFE 4519026: (process) Process should support Unicode on Win NT, request for review

Martin Buchholz martinrb at google.com
Mon Mar 23 18:19:49 UTC 2009

Alan asks a very good question.

The kinds of pathname conversion done by getNativePath
is likely already implemented in Java code somewhere.
E.g. there is this comment in ProcessImpl.java:

        // Win32 CreateProcess requires cmd[0] to be normalized
        cmd[0] = new File(cmd[0]).getPath();

I've always considered the primary purpose of getNativePath to be
native charset encoding, but for the win32 "W" API this is a no-op
because we are converting UTF-16 to UTF-16.

So I suspect we can get rid of that icky C code in getNativePath entirely,
perhaps simply replacing it by java calls to getPath() or similar functionality
extracted from something in NIO2, which is in jdk7 since b50.


On Mon, Mar 23, 2009 at 10:55, Alan Bateman <Alan.Bateman at sun.com> wrote:
> I'm not an expert
> on the Process code but is the directory already normalized at this point?
> Just wondering if all of getNativePath is needed.
> -Alan.

More information about the core-libs-dev mailing list