The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
April 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Getting Environment Variables

Posted by dot on June 03, 2001 at 10:59 PM

I need to find a way to query an environment variable and have it accessible to my java class all the time.
I've read that you need to run
java -D with the correct parms. but it seems that you have to run this everytime in the same session that your class is running in. Is that correct?
is there any way to be able to just query a system env. variable without running this?
If not, can I programatically set this in the class itself? I am giving this class to a client and we don't want them to have to do anything to use it.
Any help would be appreciated.



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us