Project

General

Profile

Bug #3714

Support for environment variable in Kepler.

Added by jianwu jianwu over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
build system
Target version:
Start date:
12/23/2008
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
3714

Description

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.

History

#1 Updated by Chad Berkley over 10 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 10 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
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.

#3 Updated by Redmine Admin over 6 years ago

Original Bugzilla ID was 3714

Also available in: Atom PDF