Environment variables are used to store the values of the frequently used parameters, that are provided to a software program at runtime. Setting and using such placeholders instead of specifying the required values in the app’s code each time they are needed, makes your application more portable and flexible. It brings even more convenience if these values may differ from one host to another.
There is a number of environment variables for the commonly used directories that are set by default at Jelastic application servers - see the lists below.
Jelastic also gives you the possibility to declare your own custom environment variables (user-defined parameters to be used with applications) by means of adding the needed values to a special config file and in such a way, keeping them out of the code. Inside this file, you can set placeholders for your folder’s names, user names, passwords, host names, IP addresses etc instead of hardcoding their values to every file they are required in.
The most common way of adding your own custom variables to any of the servers in your Jelastic environment is described in the Setting Custom Env Variables via SSH guide. Also, there is a separate instruction on setting custom variables and JVM options through the Jelastic dashboard for Java app servers.