I am trying to run ant script from eclipse, but it does not work with the following message:
BUILD FAILED
project_path/build.xml:5:
java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main :
Unsupported major.minor version 51.0
However, when I run this from the command line (./ant), it works as expected.
Environment Information:
- OS: Linux Mint 64
- Eclipse: Juno (4.2.1)
- JDK: Oracle 1.7.0_11
- Ant (command line): 1.8.2
I also set "Ant Home" (in the eclipse settings) the same as the one I use from the command line.
I searched this problem a lot, but I can not find anything that helped, I can try to remove all java (jdk / jre) that I installed now, and then reinstall java 7, but I prefer not to follow this route.
Any ideas? Thank!
source
share