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 gmx.de
Mon Apr 18 19:42:18 UTC 2011


Am 15.04.2011 15:43, schrieb Michael McMahon:
> 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.
>
> http://cr.openjdk.java.net/~michaelm/7034570/webrev.4/
>

Alternatively we could insert the SystemRoot variable from the beginning in the ProcessEnvironment 
constructor.
See my approach in the attachment, based on b84 sources and using TreeMap instead HashMap.
IMO, looks much smarter.

Please note, that my system is in a construction site state and not up to date. So I couldn't test 
the code.

-Ulf



More information about the core-libs-dev mailing list