Hi, On 8/21/06, Geir Magnusson Jr <[EMAIL PROTECTED]> wrote:
Oliver Deakin wrote: > Leo Li wrote: >> Hi, Oli: >> It is really a problem that System.getenv fails to behave as RI on >> windows. I will fix it by get env string out by os function such >> as getenvironmentvariable and getenv. Thank you for your tips. > > Thanks for looking at fixing this Leo :) > >> Besides, the returned environment variables is only defined in >> the process of the java application, for example, the command windows, >> and >> remains the same during the life cycle. :) > > It's not possible that the environment variables could change during the > lifetime > of the VM? If, for example, a Java program made a call out to native > code, isn't it > quite possible that that native code to alter the environment variables, > and thus > when we return to Java the environment of the process has changed?
I have tested on linux that a native code to setenv, but RI still gets the original value if use System.getenv. While on windows, I fails to find the "setenvironmentstring". So Harmony behaves just like RI. Would you really ever want that? Seems to be a safety issue.
geir --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Leo Li China Software Development Lab, IBM