I have jdk 1.6 and 1.7 installed.
I have updated my JAVA_HOME variable to
C:\\Program Files\\Java\\jdk1.6.0_24;C:\\Program Files\\Java\\jdk1.7.0
Your jdk is still pointing to JDK 1.6. javac is bundled with jdk, while java -version ideally runs even if jre is installed properly.
The simplest solution would be to use the java_home tool.
/usr/libexec/java_home -v 1.7.0_51 --exec javac -version
Your "javac -version" test shows that you are using javac 1.6. Then you are trying to build for 1.7 which is a future version that is unknown to the 1.6 compiler. I would do as some comments suggests and only define one JDK for a given project.
What about javac -source 1.7 -target 1.7 Test.java
?