# Setting Environment Variables

Home >  Configuring the Server >

# Setting Environment Variables

When MapForce Server mappings or StyleVision Server stylesheets run under FlowForce Server management (as jobs), they may require environment variables to be set (for example, the CLASSPATH, in order to specify the location of the JDBC drivers when connecting to a database).

To set environment variables required by MapForce Server mappings or StyleVision Server transformations, edit the .tool file of the respective Altova server product. To edit the .tool file, first check if it already exists is in the application data directory:

Table 1: FlowForce Server application data directory

 Linux /var/opt/Altova/FlowForceServer2019/data/tools/ macOS /var/Altova/FlowForceServer2019/data/tools/ Windows C:\ProgramData\Altova\FlowForceServer2019\data\tools\

If the .tool file does not exist in the directory above, copy it from the installation directory of FlowForce Server. You will find the .tool file in the tools directory relative to the FlowForce Server installation directory (it is assumed that MapForce Server or StyleVision Server were installed after FlowForce Server):

Table 2: FlowForce Server installation directory

 Linux /opt/Altova/FlowForceServer2019/ macOS /usr/local/Altova/FlowForceServer2019/ Windows C:\Program Files\Altova\FlowForceServer2019\ C:\Program Files (x86)\Altova\FlowForceServer2019\

If the .tool file exists neither in the FlowForce application data directory nor in the FlowForce installation directory, it is likely that FlowForce Server was installed after MapForce Server or StyleVision Server. In this case, you can find the .tool file in the etc directory relative to the MapForce Server or StyleVision Server installation directory.

 Make sure to copy the .tool file to the FlowForce Server application data directory (NOT the installation directory) before editing it. The .tool file in the FlowForce Server application data directory above takes precedence over the .tool file existing in other directories.   Warning: If you run the migratedb command during upgrade to a new major version of FlowForce, any .tool files from the application data directory of the previous version will be copied over to the application directory of the new version. This may have unwanted consequences; therefore, ensure that you keep in the application data directory only the .tool files that you actually need.

You can add the required environment variables under the [Environment] section within the .tool file. For example, a .tool file which sets the CLASSPATH variable looks as follows:

 [Environment] CLASSPATH=.:/usr/local/jdbc/oracle/ojdbc6.jar

Sample .tool file (Linux)

Environment variables set in the .tool file override environment variables defined by other means.

For information about executing shell commands or scripts as FlowForce Server jobs, see the /system/shell/commandline function.