A red exclamation mark or red cross will appear in the lower left corner of the imported project in Eclipse

     Sometimes, when we import a previously created web project from Eclipse, there will be a red exclamation mark or a red cross in the lower left corner of the project name, but there is no red cross inside the web project, and there is no clue of the problem, which is very annoying! Now let's talk about these two issues in detail.

When importing a project, a red exclamation mark appears in the project name, because the running environment of the project itself does not match the running environment in the current Eclipse. Mainly include: ①JRE System Library; ②Server Runtime.

First, the solution to the red exclamation mark :

1. Right-click [ Project Name ] → [ Properties ] → [ Java Build Path ] → [ Libraries ], draw two green lines, which one does not match the current Eclipse environment, please replace it yourself.

Second, the solution to the problem of the red cross

Here we need to correct the practices of some netizens. Some netizens do this: in the .settings folder under the project directory, open the org.eclipse.wst.common.project.facet.core.xml file, and modify the content. .

In fact, there is no need to be so troublesome, and see the following:

1. [ windows ] → [ Show View ] → [  Other ] → enter Problems in the search box → select the Problems view → click OK  

2. A series of small red crosses appear at the bottom of the figure, Target runtime Apache Tomcat v7.0 is not defined. This is the problem.

Solution :

1. Right-click on [ Project Name ] → [ Properties ] → [ Targeted Runtimes ] → remove the checkmark for tomcat7.0, and checkmark for tomcat8.0. → 【Apply】→ 【OK】, because Tomcat8.0 is installed on my machine, so I want to remove the upper one and select the lower one.

Reprinted from: http://www.jb51.net/softjc/450357.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326392221&siteId=291194637