[thelist] Environment variable

Aaron Johnson ajohnson at mindseye.com
Mon Dec 10 12:22:12 CST 2001


Interesting article on this very topic in the latest edition of JDC Tech
Tips:

http://developer.java.sun.com/developer/JDCTechTips/2001/tt1204.html#tip1

Short answer, no, I don't believe you can.. and you probably shouldn't as
using environment variables means your application isn't portable...

Aaron Johnson, MCSE, MCP+I
Macromedia Certified ColdFusion Developer
MINDSEYE, Inc.
<phn>617.350.0339
<mbl>617.461.3721
<fax>617.350.8884
<icq>66172567
ajohnson at mindseye.com


> Could anyone give me an idea on how to read an environment
> variable from my
> java code?
> I set an environment variable (system variable) through <Control
> Panel/System>.  I used System.getProperties() to display all the
> properties,
> the variable I created didn't appear.  Is there another way to fetch that
> information from the system, beside using System.getProperty()?
>
> Your help would be very appreciated,
> Ray.





More information about the thelist mailing list