The title says it all.
I have modified an environment variable which is used in my java project via, for example, this line in my pom.xml:
<url>${env.DB_CONNECTION_URL}</url>
For this change to take effect, I must manually restart IntelliJ.
Interestingly, I installed an IntelliJ plugin to "Restart" IntelliJ, which it does, but the environment variables are not refreshed.
Is there a way to do this, without restarting?
An IntelliJ IDEA plugin to automatically add environment variables to Path Variables. Environment variable are added to Path Variables with "env." prefix to avoid collisions. To reload the environment variables loaded: Tools -> Reload Environment Variables in Path Variables.
2. Refresh Environment Variables via Command Prompt (CMD) Step 1: In the Start menu, search for Command Prompt and run it as an administrator. Step 2: Type the command: “set PATH = c” (without quotation marks), press the enter key, and restart the Command Prompt.
No, you don't need to restart your system. However, you have to restart your command prompt application to update the changes done on Environment variables.
Create a new path variablePress Ctrl+Alt+S to open the IDE settings and select Appearance & Behavior | Path Variables. and enter the name of the new variable (for example, DATA_PATH ) and its value that points to the target directory with the data file on your disk.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With