Description Resource Path Location Type Java compiler level does not match t
问题:Description Resource Path Location Type Java compiler level does not match t
今天在自己项目中整合HBase API的时候遇到了这个问题,想了半天也不知道自己干了什么出现了这个问题。去查阅相关资料终于把这个小红叉给去掉了,在此记录一下
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文件,把文件内的版本修改成与你的电脑一致。
1 2 3 4 5 6 7 8 9 10 11 12 13 | 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 |
————————————————
版权声明:本文为CSDN博主「一朝风月S」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_37624828/article/details/83898799
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!