Using environment variables with Java

The getEnvironmentValue, getEnvironmentString, and setEnvironmentVar methods retrieve and set environment variables, which are stored in the local notes.ini file. Use getEnvironmentValue only for numeric environment variables. Use getEnvironmentString for strings and numeric values.

setEnvironmentVar prepends a dollar sign ($) to parameter 1, the name of the environment variable, if the third parameter is false or omitted. The dollar sign distinguishes user environment variables (name starts with a dollar sign) and system environment variables (name does not start with a dollar sign). getEnvironmentValue and getEnvironmentString prepend a dollar sign if the second parameter is false or omitted, and do not prepend a dollar sign if the second parameter is true.

Environment variables are useful for saving state and data between program invocations where no conflicts are possible. They are also useful for obtaining Domino® environment information, such as KitType, Directory, Preferences, Domain, Port, and so on.