commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From __matthewHawthorne <ma...@phreaker.net>
Subject [lang][io] access to environment variables
Date Thu, 16 Oct 2003 21:00:15 GMT
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.


---------------------------------------------------------------------
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