zoukankan      html  css  js  c++  java
  • 在myeclipse中使用maven前常见错误及解决办法

    1、jdk与jre

    (错误:java.lang.UnsupportedClassVersionError: Unsupported major.minor version 51.0)

    windows—preferences-java-Installed JREs Add适用的jre

    windows—preferences-java-compiler Compiler compliance level:改为与上一致版本

    项目右键—properties-java compiler Compiler compliance level:改为与上一致版本

    项目右键—properties-java builde path-add library-JRE System Library y一致的JRE

    2、报错误: -Dmaven.multiModuleProjectDirectory system propery is not set. Check $M2_HOME environment variable and mvn script match.

    解决办法: 可以设一个环境变量M2_HOME指向你的maven安装目录

    M2_HOME=D:Appsapache-maven-3.3.1

    然后在Window->Preference->Java->Installed JREs->Edit

    在Default VM arguments中设置 -Dmaven.multiModuleProjectDirectory=$M2_HOME

    3、报错:java compiler level does not match the version of the installed java project facet

    解决办法:找到项目所在的目录,在.settings子目录里面,用文本编辑器打开org.eclipse.wst.common.project.facet.core.xml配置文件

    改一下version版本 <installed facet=”java” version=”1.7”/>

  • 相关阅读:
    Linux 添加环境变量
    postgresql 获取修改列的值
    5月30日周一上午
    周日5月29日
    2016年5月26日
    如何使用Gson(添加到项目里去)
    linux内核分析课程总结()待完善
    5月5日离散课笔记
    4月28日的离散课(还少了一部分)
    2016年4月29日
  • 原文地址:https://www.cnblogs.com/wenhulu/p/5501698.html
Copyright © 2011-2022 走看看