-
下载Jdk并安装
-
配置Java环境变量
因为需要用services.bat安装,services.bat中
rem Make sure prerequisite environment variables are set if not "%JAVA_HOME%" == "" goto gotJdkHome if not "%JRE_HOME%" == "" goto gotJreHome echo Neither the JAVA_HOME nor the JRE_HOME environment variable is defined echo Service will try to guess them from the registry. goto okJavaHome :gotJreHome if not exist "%JRE_HOME%injava.exe" goto noJavaHome if not exist "%JRE_HOME%injavaw.exe" goto noJavaHome goto okJavaHome :gotJdkHome if not exist "%JAVA_HOME%jreinjava.exe" goto noJavaHome if not exist "%JAVA_HOME%jreinjavaw.exe" goto noJavaHome if not exist "%JAVA_HOME%injavac.exe" goto noJavaHome if not "%JRE_HOME%" == "" goto okJavaHome set "JRE_HOME=%JAVA_HOME%jre" goto okJavaHome
说明了要使用java的环境变量
-
安装服务
services install,设置为自动运行,浏览器http://127.0.0.1:8080/,出现tomcat表示成功.