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

Alan Bateman Alan.Bateman at Sun.COM
Fri Mar 27 16:14:18 UTC 2009


Heiko Wagner wrote:
> Hi Martin,
>
> I have updated http://www.apis.de/pub/jdk7/ProcessImpl_md.c and
> http://www.apis.de/pub/jdk7/ProcessImpl_md.c.diff.
>
> Changes:
>
> - fix block comment style
> - remove note about Win95, since minumum system requirement is Win2000
> - replace comment "selected based on exe type" with "creation flags"
>
> I have also been thinking about adding tests to ProcessBuilder/Basic.java.
> My suggestion would be to start from the version Alan made, to get the
> environment issue working. I would like to stick with your test pattern of
> starting a java process in the test. To show that we are now using
> CreateProcessW, I would start a java with Runtime.getRuntime().exec()
> having its working dir set to a, previously created, directory containing
> unicode characters and do a "pwd" operation in the java child.
>
> Although it is also possible to have the actual exe reside on a unicode path
> and pass unicode command line args, currently it is not possible to use this
> test pattern, as it needs additional modifications to the java launcher and
> java vm. What would you suggest to test this features, until we have a fully
> unicode aware version of java.exe?
>   
It is important to add a test. Your suggestion to use a working 
directory containing unicode characters is probably the best that can be 
done at this time.

Did you think any more about eliminating getNativePath? It should be 
possible to move this into 
src/windows/classes/java/lang/ProcessImpl.java and since the working 
directory is already normalized it should be simpler too.

-Alan.



More information about the core-libs-dev mailing list