I am facing some issue in IntelliJ IDEA compiler settings. I have JDK 8 installed and one of the project in idea works only on JDK 6.
I have changed the compiler version in idea in preferences -> Java Compiler page and restarted idea.
The problem I am facing is that on idea Terminal the version is not getting updated. Is there any way other than setting the JAVA_HOME in .profile within idea to solve this?
I would say it works as expected. You have changed the compiler version for IntelliJ IDEA only, thus it affects the compilation process in IntelliJ IDEA. This setting does not (and should not) affect your terminal session environment. You can change the shell launch arguments in File -> Settings -> Tools -> Terminal -> Shell path
. Since this setting can be set per a project (but not per a module, as far as I understand), you can specify project-specific settings there. I'm not sure if it's possible to pass some project-specific variables there and you probably have to hard-code arguments, but in simple case it can be changed like, let's say, cmd.exe /k echo WELCOME
(on my Windows machine) or something similar for bash
.