If you started IntelliJ through "JetBrains Toolbox", then in order to reload the environment variables you need to close them both (IntelliJ & Toolbox), start the toolbox, and then start IntelliJ via the toolbox.
Answer from Eng.Fouad on Stack OverflowIf you started IntelliJ through "JetBrains Toolbox", then in order to reload the environment variables you need to close them both (IntelliJ & Toolbox), start the toolbox, and then start IntelliJ via the toolbox.
Not possible. Once you start a process in Windows or in Unix, you can't read updated environment variables from outside. You can only change environment variables inside your process.
This IntelliJ plugin might not be completely restarting the app, but is i.e. using a different class loader instead.
Setting up and using environment variables in IntelliJ Idea - Stack Overflow
Environment Variable Manager Plugin
Probably a stupid question about JDK version in IntelliJ
IntelliJ Idea installation (for java android programming) what does this checkbox means (add launchers dir to the path)
Videos
Path Variables dialog has nothing to do with the environment variables.
Environment variables can be specified in your OS or customized in the Run configuration:

If you want to specify default environment variables for every new unit test configuration (as per this answer):
Run > Edit Configurations > Edit Configuration Templates > TestNG/JUnit > Environment Variables
I could not get environment variables to work when IntelliJ Build and run property was using Gradle. I am not sure what the root cause is, but switching to IntelliJ IDEA solved the problem. Go to Preferences -> Build, Execution, Deployment -> Build Tools -> Gradle. Then change Build and run using: to IntelliJ IDEA.

Hey everyone!
👋 I recently built a plugin called Environment Variable Manager to help manage environment variable sets directly within IntelliJ IDEA. I made it because I was constantly switching between different configs and got tired of copy-pasting env vars and manually updating into run configurations.
The plugin lets you:
-
Create/edit/clone multiple env var sets
-
Import/export from .env files
-
Easily switch the active set and inject it into your run configs with one click
-
Keep everything persistent across IDE restarts
It’s open source and still pretty new—if you want to give it a try or share feedback, I’d love that. Contributions are also very welcome!
🔗 JetBrains Plugin: https://plugins.jetbrains.com/plugin/27264-environment-variable-manager/
🔗 GitHub: https://github.com/yelynn1/intellij-env-manager
Thanks! 😊