zoukankan      html  css  js  c++  java
  • The method of type must override a superclass method解决方式

    工程导入myeclipse时,出现问题提示:The method of type must override asuperclass? annotation:@Override的原因

    查阅了一下资料,发现说在jdk1.5下要使用@Override 这个annotation 必须保证 被标注方法来源于class 而不是interface,

    但我检查过,发现自己的jdk确实是1.6版本啊。

    最后发现,即使自己的jdk是1.6,还需要修改myeclipse里面的编译jdk版本,从5.0改成6.0,要不就会出现上述错误

    修改路径是,在myeclipse下:Windows--Preferences--Java--Compiler,在右边的Compiler compliance level 修改版本为 6.0,就可以了    {Windows->Preferences->Java->Compiler  “configure project specific

    settings”, Change from java 1.5 (5.0) to 1.6 (6.0) and then “yes” rebuild project。  这个要详细些,其实 跟前面一样}

    此时,会发现 做了上面步骤,为啥还要报错,那是因为 导入的项目,还没把jre 变为6.0,解决办法为:项目右键->build path->configure build path->java Compiler(左边那排中) ->在右边的Compiler compliance level 修改版本为 6.0

    ok!!网上很多 博客 至少改了前面步骤, 后面改单独的项目的时候,确没说明,在此把这问题的解决办法整理出来,希望对新手有帮助,当然有什么不对的地方,希望大家指正

  • 相关阅读:
    Chp18: Hard
    内存泄漏 和 内存溢出
    Chp4: Trees and Graphs
    trie树--详解
    Tries
    Comparable & Comparator
    memory leak
    8个月从CS菜鸟到拿到Google Offer的经历+内推
    Word Ladder II
    Java垃圾回收机制
  • 原文地址:https://www.cnblogs.com/exmyth/p/4538789.html
Copyright © 2011-2022 走看看