Eclipse compiled tomcat8.0.26 's source code

Source: Internet
Author: User

Reference: http://www.cnblogs.com/lanxuezaipiao/p/3640923.html

1, from the Tomcat official website (http://tomcat.apache.org/) Download source code apache-tomcat-8.0.26-src.zip.

2. Download the project build tool Ant (http://ant.apache.org/). After decompression, configure the environment variable and modify the path value. For example, ant_home= "D:\Program files\apache foundation\apache-ant-1.9.6", path= "...; %ant_home%\bin ".

3, unzip the file source code to eclipse workspace. And, under the cmd command line, check to see if Ant is installed. (c:\user\> ant-version)

4, find the path of the tomcat-8.0.26, modify the path of the Build.properties.default file, (usually modified file name is Build.properties).

Found 71 rows or so: Base.path=/usr/share/java for base.path= "source Path/repository" (customizable), when building the project, will download some of the dependencies will be downloaded to this directory.

4. On the cmd command line, enter the command ant under the folder under the source of the tomcat8.0.26 that you just unzipped. Build start ...

5, after the completion of the construction, the directory will generate two folder output and repository.

6. Open Eclipse. Create a new Java project apache-tomcat-8.0.26. Right-click Src folder, import > file system Select Source Path

Select the Java folder and the Test folder.

7. In the Java project, select Java and test right-click Build path > use as source folder.

8, there will be a lot of red forks in the project, because of the lack of the corresponding dependent jar package. Under the Java project, create a new lib (for storing other dependent jar packages) folder, conf (for the Tomcat Configuration) folder.

9, download the dependent jar package. (Http://pan.baidu.com/s/1dDz1FMD). Add to the Lib folder, and then build path. Also, add JUNIT4. Copy the contents of the Conf under the source code to the Project Conf folder.

10, after adding, there are some errors, manually modified under (commented out) ... (Specific reasons, no research ...)

11. Find Org.apache.catalina.startup.Bootstrap.java, then Run as Java application.

Finish

Eclipse compiled tomcat8.0.26 's source code

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.