出现问题提示:The method xxx of type must override or implement a supertype? 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

按照以上改了,还是有红色叉号,还是报错,怎么办,

再把文件从窗口上先叉掉,再重新打开就不会报错了。

myeclipse中出现The method xxx of type must override or implement a supertype的更多相关文章

  1. Eclipse 报错The method xxx of type must override a superclass method、Description Resource Path Location Type Java compiler level does not match the version of the installed Java project facet

    问题: 如上图, 没改钱@Override会报错The method run() of type must override a superclass method 原因: java1.5中继承接口是 ...

  2. The method of type must override a superclass method解决方式(转)

    今天做struts2上传文件的时候出现了这个问题: The method execute() of type UploadAction must override or implement a sup ...

  3. (转)轻松解决 MyEclipse、Eclipse 编译时提示 @Override The method of type must override a superclass method 即 @Override 标注问题

    刚才在把工程从其他地方导入到自己机子的 MyEclipse 下时,出现了 The method of type must override a superclass method ,提示的是实现类必须 ...

  4. dao 接口定义了一个方法,报错 The method xxx is undefined for the type xxx;

    转自:https://blog.csdn.net/panshoujia/article/details/78203837 持久层(DAO层)下的一个接口 ,eclipse报了一个The method ...

  5. The method of type must override a superclass method解决方式

    工程导入myeclipse时,出现问题提示:The method of type must override asuperclass? annotation:@Override的原因 查阅了一下资料, ...

  6. MyEclipse中搭建Struts2开发环境

    (尊重劳动成果,转载请注明出处:http://blog.csdn.net/qq_25827845/article/details/53205941 冷血之心的博客) 在MyEclipse中如何搭建St ...

  7. Myeclipse学习总结(3)——Myeclipse中的代码格式化、注释模板及保存时自动格式化

    设置Myeclipse中的代码格式化.注释模板及保存时自动格式化 1:设置注释的模板: 下载此模板:  codetemplates.xml This XML file does not appear ...

  8. 错误:Attempt to resolve method: [XXX方法] on undefined variable or class name: [XXX类]的解决(IDEA打包jar问题)

    问题: 使用JMeter调用jar包的时候,报错误信息Typed variable declaration : Attempt to resolve method:[XXX方法] on undefin ...

  9. [转]在MyEclipse中设置struts.xml自动提示功能

    导入标签:<%@ taglib uri="/struts-tags" prefix="s" %> 要想在MyEclipse中实现struts.xml ...

随机推荐

  1. C#设计模式:模板方法模式(Template Method)

    一,我们为什么需要模板设计模式? 在程序设计中,可能每个对象都有共同的地方,而此时如果每个对象定义一次,如下例子,每个对象都写Stay()方法,这样在每个类中都有很多相同的代码,此时,我们需要用到模板 ...

  2. Git 关于Fast Forward提交的简单说明

    多人协同开发,使用Git经常会看到警告信息包含术语:fast forward, 这是何义? 简单来说就是提交到远程中心仓库的代码必须是按照时间顺序的. 比如A从中心仓库拿到代码后,对文件f进行了修改. ...

  3. 2018-8-10-上传代码-CodePlex

    title author date CreateTime categories 上传代码 CodePlex lindexi 2018-08-10 19:16:51 +0800 2018-2-13 17 ...

  4. 转载:对比Angular/jQueryUI/Extjs:没有一个框架是万能的

    Angular不能做什么?对比Angular/jQueryUI/Extjs 框架就好比兵器,你得明白你手里拿的是屠龙刀还是倚天剑,刀法主要是砍,剑法主要是刺.对于那些职业喷子和脑残粉,小僧送你们两个字 ...

  5. 【leetcode】662. Maximum Width of Binary Tree

    题目如下: Given a binary tree, write a function to get the maximum width of the given tree. The width of ...

  6. org.zkoss.zul.Filedownload.java 源码

    /* Filedownload.java Purpose: Description: History: Mon Apr 16 09:29:44 2007, Created by tomyeh Copy ...

  7. 【Flutter学习】基本组件之BottomNavigationBar底部导航栏

    一,概述 BottomNavigationBar即是底部导航栏控件,显示在页面底部的设计控件,用于在试图切换,底部导航栏包含多个标签.图标或者两者搭配的形式,简而言之提供了顶级视图之间的快速导航. 二 ...

  8. nginx查看变量值

    nginx查看变量值 location / { echo $host; #域名 echo $remote_addr; echo $remote_user; echo $time_local; echo ...

  9. java com.db4o 类

    <!--juan_zhai--> <dependency> <groupId>com.db4o</groupId> <artifactId> ...

  10. 网页打开qq

    网页打开qq 打开qq方法tencent://message/?uin=”+“541239271”+“&Menu=yes http://wpa.qq.com/msgrd?V=1&uin ...