IntelliJ - why does the terminal have different values ​​of environment variables

I recently replaced Java 7 with Java 8.
All regular applications in IntelliJ work smoothly.
All but tomcat applications that run from the cmd command line, but not from IntelliJ.

Unable to load due to an error in the definition of JRE_HOME.
I explicitly defined JRE_HOME in env variables and in jdk settings.
I performed

echo %jre_home%

both in the IntelliJ terminal and in cmd they received different values
(the IntelliJ terminal showed an unpaid value.).
Where are the variables in the terminal indicated?
How to change them?

+6
source share
4 answers

AFAIKT, an intellij terminal on linux is the same as starting a standalone terminal session. It is just conveniently located in the IDE.

In response to the question: "How to change terminal environment variables?"

I use virtualenvwrapper to manage my terminal environment variables for different environments like dev, test and production. It works just as well for Java development as it does for python development.

https://virtualenvwrapper.readthedocs.org

0
source

Almost 5 years later, I had the same problem with Windows 10, and I had to restart my computer to solve it.

Edit: The best solution is not to define the JRE_HOME environment variable. I don't know why, but IntelliJ adheres to this env variable.

0
source

IntelliJ, 2019.2.3 . , , .

enter image description here

0

It seems you can define specific project environment variables:

In IntelliJ environment specifications that you can set in Startup / Debug Configurations → Default → Application → Environment Variables

from: http://emmanuelbernard.com/blog/2012/05/09/setting-global-variables-intellij/#comment-617922540 enter image description here

-2
source

All Articles