1,下载 jdk:http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u3-download-1501626.html
2,下载tomcat:http://tomcat.apache.org/download-70.cgi
3,各自安装
4,配置环境变量:
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_03
JRE_HOME = C:\Program Files\Java\jre7
TOMCAT_HOME:C:\Tomcat6
CLASSPATH=.;%JAVA_HOME%\lib;%TOMCAT_HOME%\lib
Path=%JAVA_HOME%\bin
5,cmd去tomcat\bin下,执行startup
如果成功则ok
6,如果失败,并提示:
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
则找到tomcat\bin\setclasspath.bat,在开始添加:
set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_03
set JRE_HOME=C:\Program Files\Java\jre7
7,安装服务:
/tomcat/bin/service.bat install(卸载就是remove)
然后在服务器启动tomcat。
时间: 2024-10-29 05:15:50