Tomcat source download and import eclipse

Source: Internet
Author: User
Tags svn


Tomcat source download and import Eclipse 2013-10-07 00:21 10962 People read comments (1) Favorites report Category: Tomcat (2)

Copyright NOTICE: This article is the original article of the blogger, without the permission of the blogger may not be reproduced.

Directory (?) [+]

This article mainly refer to this blog http://jackycheng2007.iteye.com/blog/1477845, but the whole process encountered another problem, the special record as follows
1. Get Source code

Way one: from the official website http://tomcat.apache.org/download-70.cgi direct download, the official website provides binary and source code two kinds of downloading way, want to study tomcat source code, select source Codes way to download

Mode two: Use SVN to get the source code, first install SVN, then create a new directory TOMCAT7, and then execute the following command in the directory

[Java] view plain copy SVN co http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_35/./tags Recorded a different version of the Tomcat source, here is the download version is 7.0.35


2. Import the source code into EclipseTomcat's source code is created and managed using Ant. Install Ant and then execute Ant ide-eclipse, which will be produced in the TOMCAT7 directory after successful execution. Project and. Classpath two files, which became Eclipse Engineering.      So you can import the Tomcat source into eclipse. Execute Ant ide-eclipse times wrong:[Java]View plain Copy build FAILED build.xml:2361:the following error occurred while executing this line:build FAILED build . Xml:2449:compile failed;   The compiler error output for details. To view the compiled error log:[Java]  View Plain  copy  build-tomcat-dbcp:        [copy] copying  64 files to E:\usr\share\java\tomcat7-deps\dbcp         [Move] moving 64 files to e:\usr\share\java\tomcat7-deps\dbcp\src\java\org\apache\ tomcat\dbcp       [javac] compiling 64 source files to  E:\usr\share\java\tomcat7-deps\dbcp\classes       [javac] warning:  [options] bootstrap class path not set in conjunction with  -source 1.6       [javac] e:\usr\share\java\tomcat7-deps\dbcp\src\java\ org\apache\tomcat\dbcp\dbcp\basicdatasource.java:53: error: bas   IcDataSource is  not abstract and does not override abstract method  Getparentlogger ()  IN&NBsp commondatasource       [javac] public class BasicDataSource  implements datasource {       [javac]         ^       [javac] e:\usr\share\java\tomcat7-deps\dbcp\src\ java\org\apache\tomcat\dbcp\dbcp\delegatingstatement.java:46: error:    DelegatingStatement  is not abstract and does not override abstract method  Iscloseoncompletion ()  in Statement       [javac] public class  DelegatingStatement extends AbandonedTrace implements Statement {       [javac]        ^        [javac] e:\usr\share\java\tomcat7-deps\dbcp\src\java\org\apache\tomcat\dbcp\dbcp\ Delegatingpreparedstatement.java:57  : error: delegatingpreparedstatement is not abstract and  Does not override abstract method iscloseoncompletion ()  in Stat   ement   based on log errors, the dependent DBCP associated jar version is incorrect. The version of JDK installed on this machine is 1.7, and then a 1.6 jdk is installed on this machine, and the related environment variables are modified so that java_home points to the JDK 1.6 directory. Execute ant ide-eclipse again  build successful
Total Time:2 minutes seconds
Also note that the build log update for BUILD-TOMCAT-DBCP is:[Java]  View Plain  copy build-tomcat-dbcp:        [copy] Copying  64 files to e:\usr\share\java\tomcat7-deps\dbcp        [move]  moving 64 files to e:\usr\share\java\tomcat7-deps\dbcp\src\java\org\apache\tomcat\ dbcp       [javac] compiling 64 source files to e:\ usr\share\java\tomcat7-deps\dbcp\classes       [javac]  Note: Some input files are used or overwritten with obsolete  api.        [javac]  Note: For more information, please use  -Xlint:deprecation  recompile.        [javac]  Note: Some input files use an unchecked or unsafe operation.        [javac]  Note: For more information, please use  -Xlint:unchecked  recompile.          [jar] building jar: e:\usr\share\java\ tomcat7-deps\dbcp\tomcat-dbcp.jar         [jar] building jar: e:\usr\share\java\tomcat7-deps\dbcp\tomcat-dbcp-src.jar    Therefore, the problem can be summed up as follows: The JDK version of the Tomcat source dependency is 1.6 and below, and using jdk1.7 can cause the build to fail.        

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.