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中继承接口是不需要@Override的,而在1.6中是需要添加@Override注解的
解决:
解决此问题的办法是修改java编译器的版本,方法是:elicpse的Project菜单 --> Properties --> 找到Java Compiler将Compiler Compliance level修改为1.5以上版本即可
解决完成后可能还回有Description Resource Path Location Type Java compiler level does not match the version of the installed Java project facet的错误
原因:
eclipse/myeclipse的jdk编译版本与出现问题的项目JDK编译版本不一致
解决:
1、进入 windows---proferences---java--compiler设置编译出来的文件使用的格式是 1.8版本的 (设置成多少都行,只要兼容,并且与你项目的编译版本一直就可以,我这里统一设置成1.8)

因为我的jdk是1.8的所以选择1.8

2、右键项目--properties---java Compiler 把项目编译版本也设置成 1.8


3、右键项目--properties---MyEclipse---project Facets设置java文件的版本为 1.8,并打勾。如果没有MyEclipse选项,直接在搜索框内输入project Facets

之后就没问题了
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的更多相关文章
- eclipse中切换jre后报错:Java compiler level does not match the version of the installed Java project facet.
项目移除原来的jre环境lib后,添加本地的jre,报错如下: Java compiler level does not match the version of the installed Java ...
- eclipse Java compiler level does not match the version of the installed Java project facet.
eclipse Java compiler level does not match the version of the installed Java project facet. Create ...
- myeclipse报错: java compiler level does not match the version of the installed java project facet
在升级到myeclipse 9.0正式版后,很无耐地出发现了一个error级别的错误,虽然没在代码中,但是看着让人很不舒服.第一反应就是到网上搜索解决之道,结果,网站说在工程的属性中去找个叫啥&quo ...
- Java入门到精通——调错篇之Eclipse Java compiler level dose not match the version of the installed Java project
一.错误现象. java项目显示红色,并且类中引用包中会报红色错误,在Eclipse下面显示下面错误提示如图: 二.错误原因. 通过字面意思一看就很明白java的版本不对. 三.解决办法. 3.1右键 ...
- Type Java compiler level does not match the version of the installed Java project facet.项目内容没错但是项目上报错,不影响运行
1.Window->Show View->Problems 2.在项目上右键properties->project Facets->修改右侧的version 保持一致 3.w ...
- Maven构建项目后项目报Error错误Java compiler level does not match the version of the installed Java project fac
项目->右键->Project Facets->修改facets中Java版本(下拉箭头出)为要用的版本 Maven构建项目需注意 1.项目右键->Preferences-&g ...
- Description Resource Path Location Type Java compiler level does not match the version of the installed Java project facet Unknown Faceted Project Problem (Java Version Mismatch)
project 编译问题,需要三处的jdk版本要保持一致,才能编译通过. 1.在项目上右键properties->project Facets->修改右侧的version 保持一致 2. ...
- Description Resource Path Location Type Project configuration is not up-to-date with pom.xml. Select: Maven->Update Project... from the project context menu or use Quick Fix. spark-MT line 1 Maven Co
1.相信大家新建的maven项目,然后添加好依赖(即修改了pom.xml文件以后就会出现如下所示的错误): Description Resource Path Location Type Projec ...
- Description Resource Path Location Type Cannot change version of project facet Dynamic Web Module to 2.3.
报错信息:Description Resource Path Location Type Cannot change version of project facet Dynamic Web Modu ...
随机推荐
- Linux_CentOS-服务器搭建 <三> 补充
今天 才发现,服务器上 JDK 都没有好好的安装下.在这里补充说下. 1.看看机子上JDK的安装了多少 $ rpm -qa |grep java 会出现类似: java-1.6.0-openjdk-1 ...
- #9 Python列表和元组
前言 Python中有6种序列:列表.元组.字符串.Unicode字符串.buffer对象和xrange对象.序列通用操作包括:索引.切片.长度.加.乘.最大值.最小值,遍历和检查成员.虽然Pytho ...
- Java设计模式学习记录-中介者模式
前言 中介者模式听名字就能想到也是一种为了解决耦合度的设计模式,其实中介者模式在结构上与观察者.命令模式十分相像:而应用目的又与结构模式“门面模式”有些相似.但区别于命令模式的是大多数中介者角色对于客 ...
- hadoop fs,hadoop dfs,hdfs dfs
hadoop fs: FS relates to a generic file system which can point to any file systems like local, HDFS ...
- 【Java并发编程】6、volatile关键字解析&内存模型&并发编程中三概念
volatile这个关键字可能很多朋友都听说过,或许也都用过.在Java 5之前,它是一个备受争议的关键字,因为在程序中使用它往往会导致出人意料的结果.在Java 5之后,volatile关键字才得以 ...
- Java - ConcurrentMap原理
https://blog.csdn.net/justloveyou_/article/details/72783008 结构是怎样的?segment是什么?hashEntry是什么?默认可并发的大小是 ...
- JavaScript有这几种测试
译者按: 也许你讨厌测试,但是你不得不面对它,所以至少区分一下单元测试.集成测试与功能测试?对吧... 原文: What are Unit Testing, Integration Testing a ...
- HappenBefore
计算机芯片在操作指令的步骤: 1.获取指令 2.指令进行解码 3.去寄存器里取值 4.开始计算结果(操作) 5.将结果写会到寄存器中 执行代码的顺序可能与编写代码不一致,及虚拟机优化代码顺序,则为指令 ...
- Docker 容器备份例子
# 在 node1 执行 nginx 程序,挂载本地的目录 docker pull nginx:stable-alpine mkdir /data/html echo "hello worl ...
- 【代码笔记】Web-JavaScript-JavaScript语法
一,效果图. 二,代码. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> ...