Spotfire® Enterprise Runtime for R

TERRenviron

The optional TERRenviron files can contain the definitions of environment variables to specify such customizations as JAVA_HOME and the project directory for TERR. TERRenviron is the first file run in a customized TERR startup.

TERRenviron files can be defined in two places:

  • The site-specific file in TERR_HOME (for example, in etc/TERRenviron.site)
  • The user-specific file in ./.TERRenviron (or in ~/.TERRenviron if ./.TERRenviron does not exist).

You can define environment variables for the TERR session using bash-like syntax in the TERRenviron files. Typical lines are as follows.

VAR_NAME="variable's value"
ETC_PATH=${TERR_HOME}/etc
VAR_WITH_DEFAULT=${VAR_WITH_DEFAULT-"var's default value"}
  • The syntax ${VAR_NAME} specifies that ${VAR_NAME} should be replaced with the value of the environment variable VAR_NAME. If the environment variable is not defined, it should be replaced with an empty string.
  • The syntax ${VAR_WITH_DEFAULT-"var's default value"} specifies that ${VAR_NAME-"var's default value"} should be replaced with the value of the environment variable VAR_NAME if VAR_NAME is defined. Otherwise, it should be replaced with "var's default value".

If you want to start a session and bypass running the TERRenviron files, you can use one of the following techniques.

  • Use the command line option --no-environ.
  • Use the command-line option --vanilla.
You can use nonstandard-named TERRenviron files by defining the environment variables TERR_ENVIRON and TERR_ENVIRON_USER, setting the name to the site-specific and user-specific environment files, respectively.
Note: TERR does not report warnings or errors if these files do not exist.

Example

JAVA_HOME="C:/Program Files/Java/jre11"