Environment variables are flags that you set outside an application that the application reacts to. Applications and libraries, like RLM, read environment variables that they define. You can find a list of the RLM environment variables in our documentation.
A characteristic of environment variables is that they are set in a process, like a Windows command window or a Unix/Linux shell, and are inherited by processes that are created by that process. So if you create 2 command windows and you set an environment variable in window 1, it won’t be set in window 2; but if you run an application in window 1, the environment variable will be set in that application.
The easiest way to use an environment variable with RLM is to set it in a command window or shell, then invoke the application from that window or shell. For example, if you wanted to set RLM_DIAGNOSTICS to cause the application to write RLM diagnostic information to the file “diag.txt”:
- Windows: set RLM_DIAGNOSTICS=diag.txt
- sh, bash: export RLM_DIAGNOSTICS=diag.txt
- csh: setenv RLM_DIAGNOSTICS diag.txt
Then invoke the application from the window where you set the environment variable.
On Windows it’s possible to set the environment variable via the Windows settings:
- Open Windows Settings
- Navigate to: System > About
- Click on “Advanced system settings”
- Click on “Environment Variables…”
- Enter the environment variable name and value.
Note: You can either create a variable for a user, or for the system. Be aware that if you create the variable for a user, that user account will need to be the one that launches the application.