Please rather try:
$JAVA_HOME/bin/java -version
Maven uses $JAVA_HOME
for classpath resolution of JRE libs.
To be sure to use a certain JDK, set it explicitly before compiling, for example:
export JAVA_HOME=/usr/java/jdk1.7.0_51
Isn't there a version < 1.7 and you're using Maven 3.3.1? In this case the reason is a new prerequisite: https://issues.apache.org/jira/browse/MNG-5780