Description Resource Path Location Type Java compiler level does not match t

  导入别的地方移过来的maven项目时我们经常会碰到一个问题,Description Resource Path Location Type Java compiler level does not match......什么意思?Java 编译器级别与安装的 Java项目构面的版本不匹配。

  怎么解决?网上给了好几种解决方案。

1.右键项目,选择Properties,再选择Project facets,把Java版本改成你电脑上的Java版本(JDK版本)。

2.选择Windows->Preferences->java->Compiler,然后把JDK版本改成你的Java版本。

3.右键项目,选择build path,点击comfigure build path,然后在library中把已有的JRE library remove掉,然后Add library,选择你电脑上安装的JRE版本。

好吧,博主遇到一件尴尬的事情就是这些方法都没有用。看见那个红色的XX真的很心烦。

但是问题总是有人已经解决了的。

最后的解决方法是找到项目位置。打开本项目的.setting下org.eclipse.jdt.core.prefs文件,把文件内的版本修改成与你的电脑一致。

eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7

问题解决!

  • 17
    点赞
  • 37
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 7
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

游语

对你有帮助,可以请我喝杯奶哦

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值