Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get Windows Environment Variables 1

Status
Not open for further replies.

MarkMyers

Programmer
Jul 14, 2003
5
AU
How can I get windows environment variables? Everything I look at says that I should do strMyVar = System.getProperty("envVar"); but it does not work. I am using JBuilder4 foundation.
 
You DO use system.getProperty, but you pass the actual name of the variable as a parameter. System.getProperty("Path"), for instance, gets the contents of the Path variable.

hth
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top