Error In Eclipse

I am getting an error in eclipse while trying to build something using
ANT. I am using Linux Mint and I set the PATH, JAVA_HOME to the correct JDK but eclipse says the JAVA_HOME is the old JDK. When I type the command echo $JAVA_HOME the terminal replies with the correct JDK, I have even set the JDK that I want it to biuld with and it still does not work.

After going into preferences for ANT and adding the tools jar out of Java 8 it gives me this.

BUILD FAILED
/home/shane/Downloads/battlecode-scaffold-master/build.xml:118: java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main : Unsupported major.minor version 52.0