1. Download Related Files
1. Java and eclipse are essential.
2. Download source code distributions from http://tomcat.apache.org/download-60.cgi. Because it is in a Windows environment, the zip package is used.
2. decompress the SRC package and you can see that eclipse already exists. classpath, Eclipse. if you use eclipse, you should know that this directory is already the Eclipse project directory. You only need to use eclipse import to import the project, however, it is depressing that this is not an Eclipse project when the import operation is performed. Compared with other eclipse projects on the machine, we found that the files on windows are. classpath ,. in the project style, try to change the original file. Windows prompts that the name cannot be blank. Directly copy the two files of other projects and open them in a text editor. The content of eclipse. classpath and eclipse. Project will overwrite the two files respectively. Import eclipse.
3. Resolve dependent packages
After successfully importing eclipse, an error occurs in the project. Check the error details and find that the ant_home environment variable is not set, causing ant. jar has not been imported successfully. If ant is not installed, you need to install ant and set the ant_home variable. It is specified directly through Java build path-> Add variable of Eclipse. At this time there is a tomcat_libs_base/ecj-3.3.1/ecj-3.3.1.jar can not find, the Internet to check the, the original Tomcat also needs other dependent packages. From TomcatSource codeFind the build. properties. default file, copy the file to build. properties, open build. properties, and find the following line:
Base. Path =/usr/share/Java
Change it:
Base. Path = Tomcat source file directory/share
During Tomcat compilation, ant will let us download some necessary dependent projects, base. the path directory is used to save these project files. We can point this attribute to an existing Directory. After modifying base. path, we go back to the MS-DOS window and switch to the Tomcat SourceCodeDirectory, and then run the ant download command. It may take about 10 minutes to complete. After that, you will find several more files in the share directory. Add variable to add the tomcat_libs_base variable and direct it to the share folder.
Now we can use DEBUG Bootstrap to perform breakpoint tracking.