Support for environment variable in Kepler.
Users may need environment variable support in Kepler, so that they can easily express path in their workflows and easily reuse them in other machines.
Currently, what we support is that with constant or expression actor, you can specify property("KEPLER") to get the path of kepler.
Another thing is that propert("PTII") works in old Kepler repository but doesn't work in new Kepler repository.
In this way, users may specify the relative path from Kepler to their own paths. It is feasible but not a good way.
#1 Updated by Chad Berkley over 13 years ago
I fixed this for the trunk build. You can now choose environment variables that you would like passed into kepler by changing the modules/vanilla-trunk/resources/system.properties/vanilla-trunk.properties file. By default, the PATH and LD_LIBRARY_PATH variables are passed in.
#2 Updated by Christopher Brooks over 13 years ago
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
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.