Tomcat Source Compilation

Source: Internet
Author: User

1. Download
    • Go to the official website to download source http://tomcat.apache.org/download-70.cgi
    • or import http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_62/from SVN in eclipse
2. Modify the configuration

Rename the downloaded file Build.properties.default to build.properties.
Open Build.properties, modify Base.path=/home/jiangyu/share/eclipse/java

3. Installing Ant and Java

Do not know why, tomcat7.x compile must be jdk1.6, cannot be jdk1.7, otherwise will report the following error. Tell me about the reason.

BUILD-TOMCAT-DBCP: [Copy] Copying -Files to/usr/share/java/tomcat7-deps/dbcp [move] Moving -Files to/usr/share/java/tomcat7-deps/dbcp/src/java/org/apache/tomcat/dbcp [Javac] Compiling -source files to/usr/share/java/tomcat7-deps/dbcp/classes [Javac] Warning: [Options] Bootstrap class path not set in Co Njunction With-source1.6[Javac]/usr/share/java/tomcat7-deps/dbcp/src/java/org/apache/tomcat/dbcp/dbcp/basicdatasource.java: -: Error:basicdatasource is notAbstractand does not overrideAbstractMethod Getparentlogger () in Commondatasource [Javac] Public  class basicdatasource implements DataSource {[Javac] ^ [Javac]/usr/share/java/tomcat7-deps/dbcp/src/java/org/apache/tomcat/dbcp/dbcp/delegatingstatement.jav A: $: Error:delegatingstatement is notAbstractand does not overrideAbstractMethod Iscloseoncompletion () in Statement [Javac] Public  class delegatingstatement extends abandonedtrace  implements  Statement {[Javac] ^ [Javac]/usr/share/java/tomcat7-deps/dbcp/src/java/org/apache/tomcat/dbcp/dbcp/delegatingpreparedstate Ment.java: $: Error:delegatingpreparedstatement is notAbstractand does not overrideAbstractMethod Iscloseoncompletion () in Statement [Javac] Public  class delegatingpreparedstatement extends delegatingstatement [javac ]        ^...

It is recommended that you compile in eclipse so that you can simply replace the JDK path:

4. Compiling

compile with Ant. The compilation process needs to download the dependent packages that Tomcat requires, so keep your network connection.
After the successful compilation, the output directory will be generated in the root directory, the output directory will be found, in the build directory, the key directories such as lib,bin,conf will be discovered, and copied to the Tomcat root directory. Then how to start the process will not need me to say.

Tomcat Source Compilation

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.