Question about importing a new project-the project file is incorrect, but the sub-file is correct.

Source: Internet
Author: User
Tags apache tomcat

When we study and work, sometimes when we import others' projects to our own development tools, there will always be strange and strange errors,

The code and classes in the project are correct, but there is a Red Cross in the project folder. Today I will tell you about such errors.

The incorrect solution causes the project to report this exception and shows it to everyone step by step. I hope you will encounter this kind of problem in the future.

Solution


Error example:



We can see that there are no errors except the project file, but the Console does not tell us how to solve the problem? It's actually very simple. Let's take a look at my demo:



Open the red box option, which is the main reason why the import project has some strange errors. It will be okay if it is broken one by one ~


The following describes how to solve an error:


Error example:



There are 2 errors and 41 warning examples. We can solve the error and ignore the warning. The first error prompt of the error is as follows:

Target runtime Apache Tomcat v7.0 is not defined. The target running Apache Tomcat 7.0 is not defined.

It indicates that the new project we imported has a problem with the local version. We only need to modify the configuration code and then OK:

Configuration code:

<?xml version="1.0" encoding="UTF-8"?><faceted-project>  <runtime name="Apache Tomcat v7.0"/>  <fixed facet="wst.jsdt.web"/>  <fixed facet="jst.web"/>  <fixed facet="java"/>  <installed facet="java" version="1.7"/>  <installed facet="jst.web" version="2.5"/>  <installed facet="wst.jsdt.web" version="1.0"/></faceted-project>

Configuration file directory: Workspace ---> project name --->. settings ---> org. Eclipse. WST. Common. Project. facet. Core

Delete this sentence and save it as OK: <runtime name = "Apache Tomcat v7.0"/>

After solution:



In this way, only one error is left. If there is an error, check it in problems and solve it one by one ~


Question about importing a new project-the project file is incorrect, but the sub-file is correct.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.