Review request for 7034570 - java.lang.Runtime.exec(String[] cmd, String[] env) can not work properly if SystemRoot not inherited

Ulf Zibis Ulf.Zibis at
Fri Apr 15 11:03:40 UTC 2011

Am 15.04.2011 11:54, schrieb Alan Bateman:
> Michael McMahon wrote:
>> On Windows, we are ensuring that SystemRoot will at a minimum always be set.
> Don't you still have the corner case where Runtime.exec is invoked with an empty array and 
> SystemRoot is not in the environment (launched by an older JDK for example)? In that case we can't 
> make SystemRoot available to the child process either.

... and then on some versions of MSVCRT.DLL the whole thing will crash ??

Again I ask if we shouldn't disallow to user-define the "SystemRoot" variable on Windows?
Imagine someone has set the variable to "C:\WINDOWS", but the correct value is "D:\WINDOWS".


More information about the core-libs-dev mailing list