Tomcat Import Eclipse
This example uses
apache-ant-1.9.2 (version not the same note configuration path)
Tomcat 6.0.26
Download Ant
Http://mirror.bit.edu.cn/apache//ant/binaries/apache-ant-1.9.4-bin.zip
because only found 1.9.4 The following configuration of the download package requires attention to the path
Unzip to the E-packing directory, note that the structure after decompression should be as follows:
Sometimes there's an extra apache-ant-1.9.2 when you're accidentally decompressing.
The configuration environment variable ANT_HOMT value is: E:\apache-ant-1.9.2
Configure the path to add ";%ant_home%\bin" in the last face without quotation marks
Open cmd execution ant–version appears as a result indicating that the environment variable is configured successfully
Download Tomcat source
Browse Http://svn.apache.org/repos/asf/tomcat/tc6.0.x/tags via SVN
Then checkout the version you need.
Download Dependent packages
CMD to the checkout Tomcat source directory, execute antdownload (first make sure that the previous ant is configured with environment variables)
After the download is complete there will be a build successful
Such as:
Note: During the download process, there will be a Zip download does not come down, will always be stuck here, such as:
I have uploaded the csdn:http://download.csdn.net/detail/yangwei19680827/7712599
Two additional environment variables in eclipse
Menu =>windows=>java=>build Path=>classpath Variables
Add the following two environment variables
Ant_home your downloaded ant extracted directory such as e:/apache-ant-1.9.2
Tomcat_libs_base through the ant download downloaded directory if not set should be in the root directory of your tomcat code disk (such as my Tomcat source in the F disk, that should be in the F:/usr/share/java)
New Java project in Eclipse
Eclipse new Java project such as Tomcat6.0.26
Then import = = File System
Select download Download source of all import can be as follows:
Note into folder must be imported into the project you just created
If the project also has red XX may be environment variable not set correctly
Let's run the Org.apache/catalina/startup/bootstrap.java. OK, now you can run successfully, paste the diagram of the successful operation: