Copy Java Project error

Source: Internet
Author: User

You often need to export a project, then send it to a colleague, or open it yourself with another eclipse tool.

At this point, after importing the project, a variety of problems arise. Daniel Notes.

The same code, the environment is different, mainly to modify the environment

1. JDK Path

Different environments, using different JDK, will be a problem. You can modify the build path (Java build paths)

Right-click Project –properities–java Build Path–libraries

Then click Edit to modify the path of the JRE.

2. Web project, may not add Tomcat server, no servlet related package found

Add a Web server and it will.

Window–properities–server–runtimeenvironment–add

Select the path to the Web server.

3. After the Web server is added, there may be some problems with different server versions. (I have caused the error from TOMCAT6 to TOMCAT8)

It is sometimes found that there is nothing wrong with the files in the project, but in the location of the project name or the Red fork.

Open the project folder under the Javaeeprojectcn\formytest1\.settings\org.eclipse.wst.common.project.facet.core.xml file

There will be

<?XML version= "1.0" encoding= "UTF-8"?><Faceted-project>  <Runtimename= "Apache Tomcat v6.0"/>  <fixedfacet= "Jst.java"/>  <fixedfacet= "Jst.web"/>  <installedfacet= "Jst.web"version= "2.5"/>  <installedfacet= "Wst.jsdt.web"version= "1.0"/>  <installedfacet= "Jst.java"version= "5.0"/></Faceted-project>

Faceted-project the contents of the label, modify it just fine. Modified to:

<?XML version= "1.0" encoding= "UTF-8"?><Faceted-project>  <fixedfacet= "Wst.jsdt.web"/>  <fixedfacet= "Java"/>  <fixedfacet= "Jst.web"/>  <installedfacet= "Java"version= "1.7"/>  <installedfacet= "Jst.web"version= "3.0"/>  <installedfacet= "Wst.jsdt.web"version= "1.0"/></Faceted-project>

Sync update Daniel notes: http://www.weixuehao.com/archives/211

Copy Java Project error

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.