Myeclipse project --> perfect migration of eclipse

Source: Internet
Author: User

It's also boring. I used eclipse to load the myeclipse web project at night and found that eclipse could not identify it as a web project. If I had been thinking about it for half a day, it was discovered that it could be set in project facets.

After the settings are completed, the web project is decisively changed. Okay. Start Tomcat and find tomcat6.0/webapps /.. It is empty. Later, I found that the project deployment path must be set by myself.

OK is set. Start the project with confidence, oh my gold. startup exception. jar package not found (my jar package is introduced externally ). as a result, I found a deployment assembly in the attribute and clicked it. It seemed like I had a clue. I put all the jar packages, deploy to the WEB-INF/lib path.

Now there should be no problem. start Tomcat decisively. Sorry ~~~ The class file is not found. Tomcat/webapps/project/webroot/WEB-INF folder only lib folder, classes folder disappears .......... This is always the case. After a variety of attempts, all failed. It seems that I can only use my life-saving tools. There is no solution for Internet queries, Baidu, or Google. It may be that this problem has no practical significance. No one is so boring to think about it.

I was about to give up, and I felt a little unwilling. It would be too bad for me to give up. Calm down and analyze the differences between projects created under myeclipse and eclipse. Soon I found that the two types of generate class paths are different, myeclipse is generated in the webroot/WEB-INF/classes folder, eclipse is in the build. I tried to modify my project. classpath

<Classpathentry kind = "output" Path = "webroot/classes/"/>

<Classpathentry kind = "output" Path = "build/classes"/>

Failed so many times, start Tomcat with a try .................................. .. started successfully. there is no problem in running the project. great! Although the problem has been solved, the principle is not very clear. Which of the following statements can be told. The specific porting steps are as follows.

 

1. Change a common project to a web project

As shown in, Properties> on the project facets interface, check the dynamic Web module. The default version later is 3.0, and I changed it to 2.5. Then, check tomcat in runtimes on the right, and click OK.

 

 

2. Tomcat deployment path

On this page, double-click the Tomcat v6.0 serve [stopd ,...].

Use tomcat installation (...). Modify the server path and deploy path. Save and OK.

If you put all the jar packages under Lib, the following steps can be omitted. If you want to introduce them externally, continue step 1.

3. Deploy the jar package imported from the external step to the project.

Properties> deployment Assembly: click Add> JAVA build path entries> next> (select the jar package required by your project) Finish

Now we can proceed to step 4.

4. Use notepad to open the. classpath of the project

Modify the configuration of the following blue background.

At this time, the myeclipse web project will be perfectly transplanted to ecplise.

If you want to add or know why you need to change classpath, I hope you can teach me.

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.