Needing to Restart Intellij Idea for updated environment variables values

In my spring mvc project i am accessing an environment variable like ${FLOCK_APPS_CONFIG} .
But when i change it value in .bash_profile file the same is not reflected even if i do mvn clean etc.
It always picks up the old value.
Only when i do Invalidate Caches and Restart does it starts picking up the updated value.

Why is that ?
Is there any way to avoid this ?

Rohit BajajAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Environment variables are often only read once when a given process starts up.

I think it's just an implementation detail of IntelliJ.

If you don't like the behavior - your best bet is to contact the company and let them know.  They may have a workaround and if not they might put it on their todo list to fix in a future version.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.