I am getting this error when compiling a project: Unsupported major.minor version 51.0
. I am using JDK 1.6:
$ java -version
java version "1.6.0_51"
Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-11M4509)
Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode)
According to this page, the error is due to inconsistency between JRE and JDK. Does anyone know how to fix this? Thank you very much.
BTW, my platform is OSX 10.8.5.
Update
Here is my JAVA_HOME:
export JAVA_HOME=`/usr/libexec/java_home -v 1.6.0`