简体   繁体   English

@Override注释在Eclipse Juno中出现错误,但在Eclipse Indigo中没有

[英]@Override annotation thowing error in Eclipse Juno but not in Eclipse Indigo

I'm trying to move to using the latest version of Eclipse (Juno 4.2) but I am getting errors a project where I have used @Override annotation. 我正在尝试使用最新版本的Eclipse(Juno 4.2),但我得到的错误是我使用@Override注释的项目。 The same project does not throw any errors in Eclipse Indigo. 同一个项目不会在Eclipse Indigo中抛出任何错误。

I have had similar problems in the past but I have overcome them by changing the JRE on the buildpath. 我过去遇到过类似的问题,但我已经通过更改构建路径上的JRE来克服它们。 The settings for the project seems identical to me in Indigo and Juno. 在Indigo和Juno中,项目的设置与我相同。 How do I solve this? 我该如何解决这个问题?

在此输入图像描述

... ...

在此输入图像描述

The compiler settings are also identical 编译器设置也相同

在此输入图像描述

... ...

在此输入图像描述

I suspect there are different "JDK compliance" settings for the two projects. 我怀疑这两个项目有不同的“JDK合规性”设置。

See this question which explains how @Override changed between Java 1.5 and 1.6. 请参阅此问题该问题解释了@Override如何在Java 1.5和1.6之间进行更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM