Compile tomcat6 source code in eclipse and download the source code directly. Tomcat is an excellent open-source software. Source code It should be helpful for cainiao like me. Because tomcat6 is developed in eclipse, you can use eclipse to compile the tomcat6 source. Code That would be more appropriate. However, netbeans has plug-ins for importing eclipse projects, which is also very convenient. I even think netbeans is more convenient. Download Tomcat source code apache-tomcat-6.0.18-src to local, unzip this file. Use import in eclipse, select "existing projects into workspace", and follow the prompts to continue next. After the project is created, an error is reported during running, indicating that the java_home settings may be incorrect. After java_home is added to the environment variable, Program It runs correctly. Remember that java_home was automatically added when jdk1.5 was followed. This java_home error may be because I installed JRE again, And java_home is set to the JRE address. In fact, there is no need to install JRE when installing JDK, Because JRE is included in JDK.
SVN obtain source code
We recommend using SVN on the official Tomcat website. This plug-in is available in eclipse. You can select all available site or subversive Svn in help -- install new software and work, input Svn in fileter to find the svn plug-in. By default, you can install it.
After installing the svn plug-in, you can find SVN/project from Svn in the project type of the new project, and enter repository in the URL. Of course, you can also directly enter callback in the URL. Finally, click Finish. SVN will automatically put the project in that directory into your eclipse.
After the project was created, several errors were found, but org was not found. eclipse. jdt. core and org. apache. ant package. Find the two jar packages under eclipse plugin and import them.