Eclipse running Tomcat Source

Source: Internet
Author: User

Tomcat Import Eclipse

This example uses

apache-ant-1.9.2 (version not the same note configuration path)

Tomcat 6.0.26

Download Ant

Http://mirror.bit.edu.cn/apache//ant/binaries/apache-ant-1.9.4-bin.zip

because only found 1.9.4 The following configuration of the download package requires attention to the path

Unzip to the E-packing directory, note that the structure after decompression should be as follows:

Sometimes there's an extra apache-ant-1.9.2 when you're accidentally decompressing.

The configuration environment variable ANT_HOMT value is: E:\apache-ant-1.9.2

Configure the path to add ";%ant_home%\bin" in the last face without quotation marks

Open cmd execution ant–version appears as a result indicating that the environment variable is configured successfully


Download Tomcat source

Browse Http://svn.apache.org/repos/asf/tomcat/tc6.0.x/tags via SVN

Then checkout the version you need.

Download Dependent packages

CMD to the checkout Tomcat source directory, execute antdownload (first make sure that the previous ant is configured with environment variables)

After the download is complete there will be a build successful

Such as:

Note: During the download process, there will be a Zip download does not come down, will always be stuck here, such as:


I have uploaded the csdn:http://download.csdn.net/detail/yangwei19680827/7712599

Two additional environment variables in eclipse

Menu =>windows=>java=>build Path=>classpath Variables

Add the following two environment variables

Ant_home your downloaded ant extracted directory such as e:/apache-ant-1.9.2

Tomcat_libs_base through the ant download downloaded directory if not set should be in the root directory of your tomcat code disk (such as my Tomcat source in the F disk, that should be in the F:/usr/share/java)

New Java project in Eclipse

Eclipse new Java project such as Tomcat6.0.26

Then import = = File System

Select download Download source of all import can be as follows:

Note into folder must be imported into the project you just created

If the project also has red XX may be environment variable not set correctly

Let's run the Org.apache/catalina/startup/bootstrap.java. OK, now you can run successfully, paste the diagram of the successful operation:



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.