[kepler-dev] [Bug 3714] - Support for environment variable in Kepler.

bugzilla-daemon at ecoinformatics.org bugzilla-daemon at ecoinformatics.org
Tue Dec 23 17:40:54 PST 2008


http://bugzilla.ecoinformatics.org/show_bug.cgi?id=3714





------- Comment #2 from cxh at eecs.berkeley.edu  2008-12-23 17:40 -------
In Java, the environment variable situation is a bit of a mess.
In JDK 1.5, there is java.lang.System.getenv(String), which allows
the user to get an environment variable.  Initially, Java had a 
getenv() method, which was then removed after awhile.  The Java position
has been to use properties instead of environment variables.  However,
enough people complained that they wanted access to the environment
variables so getEnv() came back.

The Ptolemy Exec actor has an environment parameter, which will pass
an environment to a subprocess, see  
http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII7.0/ptII/doc/codeDoc/ptolemy/actor/lib/Exec.html
I think this is the best way to set environment variables that have
different values than in the current environment.

I updated ptolemy.data.UtilityFunctions and added getenv(String) and
getenv() so now it is possible to get environment variables 
and use them in Expression actor.


More information about the Kepler-dev mailing list