Eclipse engineering type Switching

Source: Internet
Author: User

Onverting a Java project to a dynamic web project in eclipse (based on WTP, through project facets)

What's WTP?
Http://www.eclipse.org/projects/project_summary.php? Projectid = WebTools

Reference the eclipse web tools platform (WTP) project extends the eclipse platform with tools for developing web and Java EE applications. IT administrators des source and graphical editors for a variety of ages, wizards and built-in applications to simplify development, and tools and APIs to support deploying, running, and testing apps.

Converting a Java project to a dynamic web project in Eclipse:
Http://greatwebguy.com/programming/eclipse/converting-a-java-project-to-a-dynamic-web-project-in-eclipse/

Eclipse-Project facets:
Http://www.beilers.com/2009/05/eclipse-project-facets/

Import the myeclipse project to eclipse:
Http://todaydiy.blog.163.com/blog/static/104189687201021035312604/

Reference 1. Make sure that your eclipse version is javaee or you have installed the WTP plug-in.
2. Modify the. project file in the Eclipse project: XML code.
  1. <! -- Add <natures> </natures> -->
  2. <Nature> org. Eclipse. WST. Common. Project. facet. Core. Nature </nature>
  3. <Nature> org. Eclipse. WST. Common. modulecore. modulecorenature </nature>
  4. <Nature> org. Eclipse. Jem. workbench. javaemfnature </nature>
  5. <! -- Add it to <buildspec> </buildspec> -->
  6. <Buildcommand>
  7. <Name> org. Eclipse. WST. Common. Project. facet. Core. Builder </Name>
  8. <Arguments>
  9. </Arguments>
  10. </Buildcommand>
  11. <Buildcommand>
  12. <Name> org. Eclipse. WST. validation. validationbuilder </Name>
  13. <Arguments>
  14. </Arguments>
  15. </Buildcommand>

3. Refresh the project. Right-click the project and choose Properties> Project facets> modify project. Select Java and dynamic web module.
Configure the context root, content directory, and source code path.

A error:

Reference Java compiler level does not match the version of the installed Java project facet

Solution:
Http://www.eclipsezone.com/eclipse/forums/t80428.html

Reference A wtp project is composed of multiple units of functionality (known as facets).
Take a look at project properties-> Project facets panel. The Java facet version needs to always match the Java compiler compliance level.
The best way to change Java level is to use the project facets properties panel as that will update both places at the same time.
Alternatively, when you get the error that you are referring to, there are quick fixes available to resolve it.
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.