An error is returned when copying a Java project. If copying a Java project, an error is returned.

Source: Internet
Author: User

An error is returned when copying a Java project. If copying a Java project, an error is returned.

You often need to export a project and send it to your colleagues, or use another Eclipse tool to open it.

After the project is imported, various problems may occur. Daniel's note: www.weixuehao.com

The Code is the same and the environment is different, mainly to modify the environment

 

1. jdk path

Different environments may cause problems if jdk is used differently. You can modify the build path (java build path)

Right-click the project-properities-java build path-libraries

Click edit to modify the jre path.

 

2. the tomcat server may not be added to the web project and the servlet-related package cannot be found.

Add a web server.

Window-properities-server-runtimeenvironment-Add

Select the path of the web server.

 

3. After adding a web server, the server version may be different and there may be some problems. (Errors I caused from tomcat6 to tomcat8)

Sometimes you may find that there is nothing wrong with the file in the project, but the project name is still a Red Cross.

Open the javaeeprojectcn \ ForMyTest1 \. settings \ org. eclipse. wst. common. project. facet. core. xml file in the project folder.

There will be

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

Modify the content between faceted-project labels. After modification:

<?xml version="1.0" encoding="UTF-8"?><faceted-project>  <fixed facet="wst.jsdt.web"/>  <fixed facet="java"/>  <fixed facet="jst.web"/>  <installed facet="java" version="1.7"/>  <installed facet="jst.web" version="3.0"/>  <installed facet="wst.jsdt.web" version="1.0"/></faceted-project>

Synchronously update Daniel's Notes: www.weixuehao.com

Http://www.weixuehao.com/archives/211

 

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.