must override a superclass method

<properties>
        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
        <maven.compiler.source>1.6</maven.compiler.source>
        <maven.compiler.target>1.6</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

上边这个不解决问题,需要下边这个

http://lwjlaser.iteye.com/blog/1158459

<plugin>  
              <groupId>org.apache.maven.plugins</groupId>  
              <artifactId>maven-compiler-plugin</artifactId>  
              <version>2.1</version>  
              <configuration>  
                <source>1.6</source>  
                <target>1.6</target>  
              </configuration>  
            </plugin>  
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
            </plugin>

奇怪的是,上下两种方法生成的class的magic都是32也就是java6阿,究竟target代表什么,

hd Start.class | head
00000000  ca fe ba be 00 00 00 32  03 d1 07 00 02 01 00 18  |.......2........|

时间: 2024-07-31 03:01:38

must override a superclass method的相关文章

@Override must override a superclass method 问题解决

如果在使用Eclipse开发Java项目时,在使用 @Override 出现以下错误: The method *** of type *** must override a superclass method 主要是因为你的Compiler是jdk5,(5不支持@Override等形式的批注)只要把它改为6就可以了. 方法:将window->preferences->java-compiler中的Compiler compliance level修改为6.0.

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

原文网址:http://www.blogjava.net/anchor110/articles/339352.html 如果在使用Eclipse开发Java项目时,在使用 @Override 出现以下错误:The method *** of type *** must override a superclass method 主要是因为你的Compiler是jdk5,(5不支持@Override等形式的批注)只要把它改为6就可以了.方法:将window->preferences->java-c

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 override a superclass method. 这看起来确实很奇怪,网上搜了一下,解决方案是将 eclipse制定版本从1.7改为1.6即可. 在 eclipse中,windows->references->java->java compiler中设置.

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

1.Java开发环境时 如果在使用Eclipse开发Java项目时,在使用 @Override 出现以下错误: The method *** of type *** must override a superclass method 主要是因为你的Compiler是jdk5,(5不支持@Override等形式的批注)只要把它改为6就可以了. 方法:将window->preferences->java-compiler中的Compiler compliance level修改为6.0. 2.ja

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

原地址:http://blog.csdn.net/aeolus1019/article/details/8014798 Android开发过程中代码错误报错如下: - implements android.view.View.OnClickListener.onClick- The method onClick(View) of type new View.OnClickListener(){} must override a superclass 解决办法: 项目属性——javaCompile

The method convert(String) of type DateConverter must override a superclass method

那是因为你的Compiler 是jdk1.5,只要把它改为 1.6就可以了 方法: j2ee换成 7 The method convert(String) of type DateConverter must override a superclass method

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,要不

The method of type must override a superclass method

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

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

@Override 时出错误: 解决办法是: 一.                                                                     因为你的Compiler 是jdk1.5,只要把它改为 1.6 方法: 1. window ->preferences... -> java -> Compiler 2. Compiler compliance level : 6.0 二. 把项目的JRE变成6.0的项目右键->build pat

问题解决:Android : Must Override a Superclass Method

在eclipse中调试OpenCV工程,import 项目时出现了这个问题: 百度了以下,这个错误十分普遍.关于@override 标示的错误,查阅了网上一些解释,主要是因为eclipse默认的Compiler compliance level是1.5,不支持@Override等形式的批注,只要把它改为1.6就可以了. 具体方法:将java compiler中的Compiler compliance level修改为1.6.依次打开:Window –> Preferences –> Java