我能得到的Java 5忽略@Override错误? [英] Can I get Java 5 to ignore @Override errors?

查看:464
本文介绍了我能得到的Java 5忽略@Override错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:结果
  <一href=\"http://stackoverflow.com/questions/987973/why-does-eclipse-complain-about-override-on-interface-methods\">Why并Eclipse的抱怨@覆盖在接口方法?

我有被使用Eclipse和Java 6 SDK编写一些Java code,所以实现接口的方法与 @覆盖注释 - 的注释,是合法的Java 6中,而不是在Java 5中。

I have some Java code that was written using Eclipse and the Java 6 SDK, so methods that implement an interface are annotated with @Override - an annotation that is legal in Java 6, but not in Java 5.

我想使用Java 5 SDK(的javac 在Mac OS X 10.5)编译相同code。一切编译和运行除了 @覆盖注释罚款。有什么办法,我可以得到的javac忽略 @覆盖注释这个项目,或者是将它们全部删除唯一的解决办法?

I'd like to compile the same code using the Java 5 SDK (javac on Mac OS X 10.5). Everything compiles and runs fine except for the @Override annotations. Is there any way I can get javac to ignore the @Override annotations for this project, or is the only solution to remove them all?

推荐答案

显然,你可以升级到Java 1.5 U21,这将解决该问题:

Apparently you can upgrade to Java 1.5 u21 and this will fix the problem:

<一个href=\"http://stackoverflow.com/questions/2335655/why-is-javac-failing-on-override-annotation\">http://stackoverflow.com/questions/2335655/why-is-javac-failing-on-override-annotation

这篇关于我能得到的Java 5忽略@Override错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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