问题

如果在使用Eclipse开发Java项目时,在使用 @Override 出现以下错误:
The method *** of type *** must override a superclass method

原因一般是因为所用Compiler是jdk5,(5不支持@Override等形式的批注)

解决

网上几乎都是说将window->preferences->java-compiler中的Compiler compliance level修改为1.6或以上,但我已经设了仍不行,

最后通过将 项目右键->Properties->Java Compier 中的Compiler compliance level改为1.6解决。

相关文章:

  • 2021-07-15
  • 2022-12-23
  • 2021-09-29
  • 2021-11-14
  • 2022-12-23
猜你喜欢
  • 2021-07-07
  • 2021-07-22
  • 2022-02-13
  • 2022-12-23
  • 2021-06-26
相关资源
相似解决方案