Using IntelliJ IDEA (v2019.1.2 Ultimate on Manjaro Linux), I need to be able to "inject" some environment variables into the IDE on startup. For instance, all of my projects need to know the host name of the MYSQL server to use, e.g. MYSQL_HOST
. I have exported this and other variables in /etc/bash.bashrc
as well as ~/.profile
and ~/.bashrc
but IDEA does not seem to pick up these variables from any of those locations even after logging out / rebooting.
I am not interested in setting these environment variables for each and every project / run configuration manually. I need to set them once, globally, and have them apply everywhere.
However, to illustrate what I mean, IDEA does list the "system" environment variables that it has loaded in the Run/Debug Configuration > Environment Variables window:
My specific env vars are not listed here, and I'm not sure from whence the listed vars came.
Where should I enter environment variables so they will be picked up by IntelliJ IDEA?