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

The method of type must override a superclass method解决方式的更多相关文章

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

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

  2. The method of type must override a superclass method

    导入android项目时,报The method of type must override asuperclass method 一堆错误, 解决方法: 将编译的jdk与使用的jdk版本一致即可.

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

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

  4. bug2 The method of type must override a superclass method解决方式(去掉@override可以)

    @Override 时出错误: 解决办法是: 一.                                                                     因为你的Co ...

  5. 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中继承接口是 ...

  6. 【转】@Override must override a superclass method 问题解决

    原文网址:http://www.blogjava.net/anchor110/articles/339352.html 如果在使用Eclipse开发Java项目时,在使用 @Override 出现以下 ...

  7. @Override must override a superclass method 有关问题解决

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

  8. eclise -The method onClick(View) of type new View.OnClickListener(){} must override a superclass method

    在做arcgis android开发的时候,突然遇到这种错误,The method onClick(View) of type new View.OnClickListener(){} must ov ...

  9. eclise -The method onClick(View) of type new View.OnClickListener(){} must override a superclass method 在做arcgis android开发的时候,突然遇到这种错误,The method onClick(View) of type new View.OnClickListener(){} mus

    eclise -The method onClick(View) of type new View.OnClickListener(){} must override a superclass met ...

随机推荐

  1. maven指定构建的编码格式

    pom.xml文件添加如下内容: <properties>    <project.build.sourceEncoding>UTF-8</project.build.s ...

  2. C# 汉字的字符串截取指定字节的长度

    int index = 0;            int setCharCount = 74;            string str1 = "三星 SCH-I829 电信3G手机(优 ...

  3. 关于C#编程中引用与值类型赋值的一些容易犯错的地方

    值类型与引用类型的区别在于:值类型在赋值的时候是拷贝值,引用类型在赋值的时候的拷贝引用.记住这一个原则,我们再来分析一些具体情况: PointStruct pt1 = ,); PointStruct ...

  4. 137 Single Number II(找唯一数Medium)

    题目意思:一个int数组,有一个数只出现一次,其他数均出现三次,找到这个唯一数 思路: 1.将所有数用2进制表示,计算每一位的数字和  1*3*n1+0*3*n2+c   唯一数对应位的数字(0或者1 ...

  5. Routing

    假如有一个请求:localhost/home/index,那么路由需要做的事情如下: (1)确定Controller (2)确定Action (3)确定其他参数 (4)根据识别出来的数据,将请求传递给 ...

  6. python运维开发之第五天

    一.模块五大部分 定义,导入方法,import本质(路径搜索),导入优化,模块的分类 1.定义: 模块是用来从逻辑上组织python代码(变量,函数,类,逻辑实现一个功能),本质就是.py结尾的pyt ...

  7. 安装mysql-python报错

    运行: pip install mysql-python报错如下: Downloading/unpacking MYSQL-python Downloading MySQL-python-1.2.5. ...

  8. linux c数据库备份第五版

    linux下c实现的数据库备份程序终于迎来第五版啦,这样改程序就暂告一段落啦,有点小激动呢...接下来的一周(可能两周)时间里,我会用一个小型的网络游戏(比拼99乘法)作为我学习linux c的毕业之 ...

  9. SqlServer 还原,备份 Sql脚本命令

    备份 USE master go ),); set @path='d:\backup\'; set @name=@path+'TsDb.bak'; Backup database TsDb To di ...

  10. MVC中的控制器

    authour: chenboyi updatetime: 2015-04-25 12:22:35 friendly link:   目录: 1,思维导图 2,控制器约定 3,action向视图传值的 ...