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