• 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文件,把文件内的版本修改成与你的电脑一致。

    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

  • 相关阅读:
    mysql中cast() 和convert()的用法讲解
    li内有span需要右浮的问题
    svn检出项目
    vue中的 ref 和 $refs
    for in 循环 和for循环 for of循环
    setInterval()、clearInterval()、setTimeout()和clearTimeout() js计数器方法(还有第三个参数)
    利用history.pushState()实现页面无刷新更新
    函数isNaN() parseFloat() parseInt() Math对象
    一个关于margin-top的问题
    vue 父子组件之间传参
  • 原文地址:https://www.cnblogs.com/wwssgg/p/16665570.html
Copyright © 2020-2023  润新知