第一步,配置好ant的环境变量
Create an ANT_HOME environment variable to point the directory ${ant.home}, and modify the PATH environment variable to include directory"${ant.home}/bin" in its list. This makes the "ant" command line scriptavailable, which will be used to actually perform the build.
Use Windows->Preferences and then Java->Build Path->ClasspathVariables to add two new Classpath variables:
添加两个参数
TOMCAT_LIBS_BASE 值为D:/ant/tomcat_libs_base/
ANT_HOME 值为D:\apache-ant-1.8.0
Use File-> "Existing Projects into Workspace" 选择apache-tomcat-6.0.39-src目录导入即可。
导完项目之后,怎么让tomcat跑起来呢?
To run Tomcat without a special IDE plug-in, you can simply use Run->Run...enter "org.apache.catalina.startup.Catalina" as the main class,"start" as program arguments, and"-Dcatalina.home=..." (with the name of your build directory) as VM arguments.
其实很简单,点右键run as > run configurations 选择java application 再点右键 选择 new 出现如下图: