Eclipse builds MAVEN project to show Red Fork Solutions

Source: Internet
Author: User

1. Once established, you will find that the project has a red fork.

At this time found to check in main, open the project "Java Build path" source, found that there is a red fork (such as), which is due to our src/main does not establish the corresponding compilation path Main/java and Test/java caused by, The two compiled folders are added.

After adding the compiled folder, we find that the Red Fork has not disappeared, and then found the Red Fork is due to the superclass "Javax.servlet.http.HttpServlet" is not found on the Java in the index.jsp page. Build path error is caused by the fact that the project was not introduced Servlet-api.jar, so the Tomcat runtime environment needs to be added. Project "Libraries" Add Library "Server Runtime" Tomcat,ok.

Now the Red Fork in the project is gone and replaced by an exclamation point. We found that the exclamation mark was on the Java resources and opened without an exclamation mark. After several tests, it was found that this was due to the inconsistency between the version of the JRE system libarary referenced by the project and the Java version loaded on this machine, so long as the project Properties Java build Path Libraries the JRE system Libary version to the Java version of the machine is available, and the last step, is to go to project Facets Java version also changed the version of the cost machine java.

After these several, the fork exclamation in the project disappears.

Eclipse builds MAVEN project to show Red Fork Solutions

Related Article

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.