蚂蚁和Java 8 - "主要版本52比51,这个编译器&QUOT支持的最高的主版本更新; [英] ant and java 8 - "major version 52 is newer than 51, the highest major version supported by this compiler"

查看:1147
本文介绍了蚂蚁和Java 8 - "主要版本52比51,这个编译器&QUOT支持的最高的主版本更新;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从Java 7升级我的Ant项目到Java 8结果
(部署在月食开普勒该项目的Java™8支持到Eclipse开普勒SR2)

I am trying to upgrade my ant project from java 7 to java 8.
(the project deployed in "Eclipse Kepler" with "Java™ 8 support to Eclipse Kepler SR2")

对于我下载蚂蚁1.9.4(根据这个帖子 http://wiki.eclipse.org/Ant/Java8),并配置它作为我的蚂蚁家。

For that i downloaded ant 1.9.4 ( according this post http://wiki.eclipse.org/Ant/Java8) , and configure it's as my "ant home".

当我试图编译了以下警告:

 主要版本52比51较新的,这个编译器支持的最高的主版本。
 [javac的]建议编译器进行升级。

when i am trying to compile a got the following warning: "major version 52 is newer than 51, the highest major version supported by this compiler. [javac] It is recommended that the compiler be upgraded."

但是,对于在工作区所限定的编译器是1.8。
(在Ant配置它定义编译器是工作空间相同的编译器。)

But the compiler that defined for the workspace is 1.8. (In the ant configuration it's define the compiler to be the same compiler of the work space..)

任何想法发生了什么?

Any idea whats happened?

非常感谢。

埃亚尔

推荐答案

请检查由蚂蚁所用的tools.jar是JDK8而不是JDK7。

Please check that the tools.jar used by Ant is from JDK8 and not JDK7.

窗口 - > preferences:

Window -> Preferences:

在左窗格中,转到蚂蚁 - >运行。在Classpath选项卡,勾选全球条目。

In the left pane, go to Ant -> Runtime. In the Classpath tab, check the Global Entries.

这篇关于蚂蚁和Java 8 - "主要版本52比51,这个编译器&QUOT支持的最高的主版本更新;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆