为什么蚂蚁给我一个不支持的版本MAJOR.MINOR错误 [英] Why is Ant giving me a Unsupported major.minor version error
本文介绍了为什么蚂蚁给我一个不支持的版本MAJOR.MINOR错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我运行这一目标的蚂蚁。
I'm running this target in Ant.
<target name="compile" depends="init"
description="compile the source " >
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}"/>
</target>
它给我这个错误。
It's giving me this error.
C:\Users\..\workspace\..\build.xml:21: java.lang.UnsupportedClassVersionError:
com/sun/tools/javac/Main : Unsupported major.minor version 51.0
下面是版本:
Apache Ant(TM) version 1.8.2
JDK version is JDK 1.7.0
下面是我的编译器设置在Eclipse中。
Here's my Compiler settings in Eclipse.
请帮我解决这个问题。
推荐答案
运行时的JRE设置为JRE 6,而不是在构建配置窗口JRE 7。
The runtime jre was set to jre 6 instead of jre 7 in the build configuration window.
这篇关于为什么蚂蚁给我一个不支持的版本MAJOR.MINOR错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文