title: IntelliJ - why does the terminal has different environment variables values
body: <p>I have recently replaced Java 7 to Java 8.<br>
  All regular apps in IntelliJ runs smoothly.<br>
  All but the tomcat apps - which run from the cmd command line but not from IntelliJ. </p>
  
  <p>It fails to load due to an error in the JRE_HOME definition.<br>
  I have oviously defined JRE_HOME in the env variables and in the jdk settings.<br>
  I have executed  </p>
  
  <pre><code>echo %jre_home%
  </code></pre>
  
  <p>both in the IntelliJ terminal and in the cmd and received different values<br>
  (IntelliJ terminal showed unupdated value.).<br>
  Where are the variables in the terminal declared?<br>
  How do I change them?</p>