`
阿凡提学计算机
  • 浏览: 40179 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类

Tomcat源码解读--搭建eclipse工程(一)

 
阅读更多

1、tomcat官网:http://tomcat.apache.org/index.html

2、源码下载:http://tomcat.apache.org/download-70.cgi,选择下面的Source Code Distributions,如果是windows选择zip下载。

3、Building withEclipse:把下载的源码导入eclipse

http://tomcat.apache.org/tomcat-7.0-doc/building.html#Building_with_Eclipse 步骤如下:

(1) 下载ant配置环境变量

(2) 进入${tomcat.source}此目录,将build.properties.default 改为build.properties修改里面属性base.path=D:/ant/repository

(3) 打开命令行(cmd),进入${tomcat.source}此目录,执行ant ide-eclipse

(4) 配置eclipse环境变量,进入Java-Build Path-Classpath Variables

TOMCAT_LIBS_BASE---在bulid.properties中设置base.path=D:/ant/repository

ANT_HOME--- D:/apache-ant-1.8.1

4、运行Main程序,main方法在Bootstrap.java,配置如下的vm参数和程序参数,就可以运行了。

Program arg :start

VM arg:-Dcatalina.home=“D:\workspace\test_tomcat\apache-tomcat-7.0.22-src\output\build”

5、进入http://localhost:8080/,就可以校验是否启动成功。

 

  • 大小: 163.3 KB
  • 大小: 60.8 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics