Tips for importing a Java project from myeclipse to eclipse

Source: Internet
Author: User

As we all know, myeclipse comes with a lot of practical plug-ins. Thanks to the powerful functions of these plug-ins, it helps web programmers improve development efficiency and see the infinite spring! Eclipse gives everyone the impression that green software, small in size, fast in speed, and refreshing in the interface, all of these are its notable advantages. Of course, it also has shortcomings, that is, the function is relatively less than that of myeclipse. Although eclipse can also use extension plug-ins to add many of the same functions as myeclipse, many people get used to the plug-ins and are always troubled by the plug-ins, it is better to install myeclipse directly. After a while, you can get everything done, and then you can start your own great career. However, I would like to say that it was the original eclipse. Now eclipse has released many development versions. Whether you are c ++ or Java, eclipse provides the corresponding development version. For example, for Java Web development, eclipse has a corresponding J2EE version. Of course, radish and vegetables have their own love. Everyone has their favorite IDE, and each ide has its advantages and disadvantages. For example, I like non-memory-consuming and nice interface tools, so eclipse is definitely my favorite, especially the font and color of the Code in eclipse are well matched, it looks comfortable. Of course, there is another objective reason, that is, the development language is Java. It is precisely for this reason that when you encounter a myeclipse web project, if I want to directly import this project to my eclipse working directory, I need to make some configuration changes. If it is not modified, the project will not be able to run directly. The procedure is as follows:

1. Import web projects through eclipse import.

2. Open the. project file and replace the <buildspec>... </buildspec> <natures>... </natures> section in the original configuration file with the following content:

 

Java code
  1. <Buildspec>
  2. <Buildcommand>
  3. <Name> org. Eclipse. WST. Common. Project. facet. Core. Builder </Name>
  4. <Arguments>
  5. </Arguments>
  6. </Buildcommand>
  7. <Buildcommand>
  8. <Name> org. Eclipse. WST. jsdt. Core. javascriptvalidator </Name>
  9. <Arguments>
  10. </Arguments>
  11. </Buildcommand>
  12. <Buildcommand>
  13. <Name> com. genuitec. Eclipse. j2eedt. Core. webclasspathbuilder </Name>
  14. <Arguments>
  15. </Arguments>
  16. </Buildcommand>
  17. <Buildcommand>
  18. <Name> org. Eclipse. jdt. Core. javabuilder </Name>
  19. <Arguments>
  20. </Arguments>
  21. </Buildcommand>
  22. <Buildcommand>
  23. <Name> com. genuitec. Eclipse. j2eedt. Core. j2eeprojectvalidator </Name>
  24. <Arguments>
  25. </Arguments>
  26. </Buildcommand>
  27. <Buildcommand>
  28. <Name> com. genuitec. Eclipse. j2eedt. Core. deploymentdescriptorvalidator </Name>
  29. <Arguments>
  30. </Arguments>
  31. </Buildcommand>
  32. <Buildcommand>
  33. <Name> org. Eclipse. WST. validation. validationbuilder </Name>
  34. <Arguments>
  35. </Arguments>
  36. </Buildcommand>
  37. <Buildcommand>
  38. <Name> com. genuitec. Eclipse. Ast. Deploy. Core. deploymentbuilder </Name>
  39. <Arguments>
  40. </Arguments>
  41. </Buildcommand>
  42. </Buildspec>
  43. <Natures>
  44. <Nature> org. Eclipse. Jem. workbench. javaemfnature </nature>
  45. <Nature> org. Eclipse. WST. Common. modulecore. modulecorenature </nature>
  46. <Nature> com. genuitec. Eclipse. Ast. Deploy. Core. deploymentnature </nature>
  47. <Nature> com. genuitec. Eclipse. j2eedt. Core. webnature </nature>
  48. <Nature> org. Eclipse. jdt. Core. javanature </nature>
  49. <Nature> org. Eclipse. WST. jsdt. Core. jsnature </nature>
  50. <Nature> org. Eclipse. WST. Common. Project. facet. Core. Nature </nature>
  51. </Natures>

 

3. Refresh the project. Right-click the project and choose Properties> Project facets> Configuration> Custom. Select Java and dynamic web module (note the version. If you cannot determine your version, test from high to low)

4. Modify the following content in the org. Eclipse. WST. Common. component file in the. settings directory (which can be viewed in the navigator view:

 

Java code
  1. <WB-resource deploy-Path = "/" Source-Path = "/webcontent"/>


Changed:

 

 

Java code
  1. <WB-resource deploy-Path = "/" Source-Path = "/webroot"/>

 

5. Refresh the project and check whether the classpath is faulty.
6. Delete the default webcontent directory of eclipse. myeclipse defaults to webroot.

 

After all, you can deploy and access it.

 

Address: http://wangshi-ws.iteye.com/blog/1564351

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.