MayoMan
MayoMan

Reputation: 4917

IntelliJ always builds for Java 1.7

I have my ANT configured to use a 1.6 JDK, my ENV variables JRE_HOME and JDK home both point to JDK6. If I modify the JDK 6 folder name in my File explorer then my ANT build fails, cannot find JDK, so I know for sure it is using the correct JDK. However the generated clases are always compiled against java 1.7. Why i this? (My generated classes will only run on a 1.7 jre, I get version error if i run on a 1.6 JRE) All my project/module settings are pointing to 1.6 jdk.

Upvotes: 1

Views: 1669

Answers (1)

CrazyCoder
CrazyCoder

Reputation: 401975

Looks like not all of your Module/Project settings point to JDK 1.7 or you are using in-process javac option in Settings | Compiler while running IDEA under JDK 1.7.

Also check additional javac command line options, it should not contain options like -source 1.7 -target 1.7.

Upvotes: 3

Related Questions