Import Tomcat source code actually said simple also not simple, said not simple also simple, mainly environmental problems, the middle spent a lot of my time, online find a lot of no use, refer to some articles, and then slowly grope out.
Environment: (1) jdk:jdk1.6.0_45 I under Is this version, as long as the jdk1.6 can be (1.7 is not compiled, anyway I am not, finally configured a number of 1.6) Jdk6
(2) ant:apache-ant-1.9.6 should be more than 1.7 of all can http://ant.apache.org/bindownload.cgi
(3) Tomcat:apache-tomcat-7.0.65-src This can be selected in http://tomcat.apache.org/download-70.cgi download, pull to the bottom there is a source Code Distributions
Two are available to download and unzip.
(1) environment variable configuration of JDK I won't say much. If there are two versions of the JDK that can be reconfigured, you can have the system environment variable the order of the path is left to right, and no further search is found. If the Java-version version is encountered, the reason can be found based on this principle.
(2) Ant environment Configuration, like JDK, there is not much to say.
(3) After extracting the Tomcat source, copy the APACHE-TOMCAT-7.0.65-SRC to the directory you want to store,E:\tomcatsource\apache-tomcat-7.0.65-src
Modify the name of the Build.properties.default file under this directory to Build.properties, in the build.properties file configuration base.path, This is the location where you download the Tomcat source dependency package after Ant. E:\tomcatsource\apache-tomcat-7.0.65-src\tomcatbasepath
Note : not "\", but "/", the configuration file is E:/tomcatsource/apache-tomcat-7.0.65-src/tomcatbasepath
are ready to start ant. CMD enters E:\tomcatsource\apache-tomcat-7.0.65-src , the root directory of the Tomcat source code, and executes the ant Ide-eclipse
This error occurred, wait for the next execution ant Ide-eclipse, the result build succeeded.
I don't know why. Anyway, now it's good, and the. classpath and. Project files are generated, and are imported into eclipse through these two files. Now it's time to import the Tomcat source into eclipse.
How to import eclipse I didn't say much, just like importing Java projects.
This is how the import works.
The project may have a red exclamation mark or a red fork after importing, because Tomcat also needs to import other dependent packages, jdk,junit packages, and some others.
The result of the last edit is that the ant_home represents the root directory where ant is installed. Tomcat_libs_base is the front base.path directory.
I have already edited the above one.
Fill in the name and path, where path is not the path to the jar package, depends on the root directory of the package, so select folder.
All edited after the Tomcat directory is this, the Red Fork is gone, research Tomcat's source code officially opened.
Eclipse Import TOMCAT7 Source code