commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <bay...@generationjava.com>
Subject Re: [lang][io] access to environment variables
Date Fri, 17 Oct 2003 02:14:02 GMT


On Thu, 16 Oct 2003, __matthewHawthorne wrote:

> Sun deprecated java.lang.System.getenv(String) many moons ago, but I
> frequently find myself in situations where I need to access environment
> variables.  I have a class which allows read-only access to env vars,
> would this be a good addition to [lang] or [io]?
>
> The interface is pretty simple, for example:
> Environment.getEnvironment().getVariable("ANT_HOME");
>
> I use o.a.c.l.SystemUtils to get the OS type, then run 'cmd /c set' on
> windows, 'env' on unix.
>
> I'm not sure if others have a need for this type of thing.  Let me know
> what you think.

Ant have this one solved from what I understand. Extracting their
solution, applying any modifications we might want and using that would
best fit Lang's purpose I think.

I think it's a good fit for SystemUtils, and Ant show there is a need for
this kind of thing.

Hen


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message