I have eclipse indigo (3.7.2) on Ubuntu 12.04 64 bit and I try to compile project using java 1.7. I think I have installed java 1.7 properly because, I can run processing 2.0 (which use java 1.7) and I get correct version message:
prokop@prokop-Precision-T1500:~$ java -version
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
however, when hit "play" in Ant in eclipse I get following message:
Unsupported major.minor version 51.0
also in header caption of "Console" window of ant build output is :
[Ant Build] /usr/lib/jvm/java-6-openjdk/bin/java
I tried to modify environment settings of eclipse:
/home/prokop/SW/jdk1.7.0_60
but it does not help - ant is oviously still using java-6-openjdk
This occurs when you run ant via eclipse. You can set JDK using External tools configuration in Eclipse. See the attachment.