Construction of Tomcat7 source environment
I read a lot of articles about the construction of the source environment on the Internet, almost all of which ended in failure. All right, needless to say, let's share my journey. I hope it will be helpful to the children's shoes who love to analyze the source code.
Tomcat source code compilation requires the installation of ant, and the need to install both jdk6 and jdk7, is indispensable.
The first step: go to the ant official website to download the installation file in zip format, decompress it to the local, and then configure the environment variables, you can refer to the information of the website to do.
Step 2: extract the Tomcat source code locally, and then find the default configuration file in the root directory: build.properties.default, configure the path of jdk7, which is important to configure. The author's configuration is as follows: java.7.home=D:/Java/jdk1.7.0_79
Step 3: configure the environment variable JAVA_HOME to jdk6
Finally, execute ant in the root directory of the source code. If BUILD SUCCESSFUL appears, you have compiled it successfully!