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

Michael McMahon michael.x.mcmahon at
Fri Apr 15 13:43:45 UTC 2011

Ulf Zibis wrote:
> Am 15.04.2011 14:15, schrieb Alan Bateman:
>> Ulf Zibis wrote:
>>> :
>>> 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".
>> No, I don't think we should silently change the value of this or 
>> other variables.
> I don't think about silently changing, I think about to *disallow to 
> set* it e.g. by the put() method, and instead retrieve it by default 
> from constructor, so it could be always read by the get() method.
> -Ulf
I have incorporated much of Ulf's approach into this version.

I agree with Alan about the spec. We could find other variables in the 
future that need
to be set, but can have alternative values other than the default. I 
think this approach
is the most flexible.


More information about the core-libs-dev mailing list