zoukankan      html  css  js  c++  java
  • java项目显示红叉,程序却没有错误

    转 http://blog.sina.com.cn/s/blog_825b7d7c0102w7rq.html

    (2016-07-02 11:38:38)
      分类: javaWeb
    电脑换了不同版本的Tomcat和JDK后,导入之前的项目出现红叉错误,程序却没有出现错误:
    在eclipse的markers标签页下提示2个错误警告:
    错误一: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)
    本地资源描述文件中配置的jdk版本和我电脑上安装的版本不匹配。

    解决方案:找到项目在本地工作空间目录下的  .settings目录。打开org.eclipse.wst.common.project.facet.core.xml

    < ?xml version="1.0" encoding="UTF-8"?>
    < ?faceted -project>
    < ?runtime name="MyEclipse Tomcat v7.0">
    < ?fixed facet="wst.jsdt.web">
    < ?fixed facet="java">
    < ?fixed facet="jst.web">
    < ?installed facet="java" version="1.5">
    < ?installed facet="jst.web" version="2.5">
    < ?installed facet="jst.web.jstl" version="1.2">
    < ?installed facet="web.struts2" version="2.1">
    < ?installed facet="wst.jsdt.web" version="1.0">
    < /faceted>
    < /code>

    < ?installed facet="java" version="1.5">修改成自己电脑上安装的jdk版本,比如我安装的jdk是jdk1.8.0_91,就修改为

    错误二:
    Description Resource Path Location Type Target runtime MyEclipse Tomcat v7.0 Unknown Faceted Project Problem    本地安装的tomcat版本与项目资源配置文件配置的版本不匹配
    解决方案:
    找到项目在本地工作空间目录下的  .settings目录。打开org.eclipse.wst.common.project.facet.core.xml
    < ?xml version="1.0" encoding="UTF-8"?>
    < ?faceted -project>
    < ?runtime name="MyEclipse Tomcat v7.0">
    < ?fixed facet="wst.jsdt.web">
    < ?fixed facet="java">
    < ?fixed facet="jst.web">
    < ?installed facet="java" version="1.5">
    < ?installed facet="jst.web" version="2.5">
    < ?installed facet="jst.web.jstl" version="1.2">
    < ?installed facet="web.struts2" version="2.1">
    < ?installed facet="wst.jsdt.web" version="1.0">
    < /faceted>
    < /code>
    将< ?runtime name="MyEclipse Tomcat v7.0">删除,保存后在eclipse中右键项目refresh.
  • 相关阅读:
    ifdef有大用处
    osgEarth编译
    CyanogenMod 7.1 for Sony Ericsson X8 下载 CM7.1 for 索爱X8下载
    ArcGIS影像配准与空间配准
    ArcGIS Server的切图原理深入
    Arcgis server的rest服务url写法解读
    地图切片公式
    新随笔
    solr的java调用
    配置文件
  • 原文地址:https://www.cnblogs.com/lusufei/p/7241163.html
Copyright © 2011-2022 走看看