JDK和Tomcat安装.properties JAVA_HOME(JDK位置)D:\JDKCLASS_PATH.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jarPATH;%JAVA_HOME%\bin;JDK查看是否安装成功java -version接着安装TomcatCATALINA_HOME(Tomcat位置)PS:我在安装完tomcat后
JAVA_HOME(JDK位置) D:\JDK CLASS_PATH .;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar PATH ;%JAVA_HOME%\bin; JDK查看是否安装成功 java -version 接着安装Tomcat CATALINA_HOME(Tomcat位置) PS:我在安装完tomcat后,启动总是一闪而过,一直以为是JDK安装失败,反复查找下发现不是tomcat的问题,具体操作如下: 我把tomcat8.exe拖入cmd运行,直接提示错误: C:\Users\Administrator>D:\apache-tomcat-8.5.8\bin\tomcat8.exe [2017-11-01 17:47:10] [warn] [13768] The system cannot find the Registry key for service 'tomcat8' [2017-11-01 17:47:10] [error] [13768] Load configuration failed [2017-11-01 17:47:10] [error] [13768] 系统找不到指定的文件。 [2017-11-01 17:47:10] [error] [13768] Commons Daemon procrun failed with exit value: 2 (Failed to load configuration) [2017-11-01 17:47:10] [error] [13768] 系统找不到指定的文件。 后来百度一下,发现执行 C:\Users\Administrator>D:\apache-tomcat-8.5.8\bin\service.bat install Installing the service 'Tomcat8' ... Using CATALINA_HOME: "D:\apache-tomcat-8.5.8" Using CATALINA_BASE: "D:\apache-tomcat-8.5.8" Using JAVA_HOME: "D:\JDK\jdk" Using JRE_HOME: "D:\JDK\jdk\jre" Using JVM: "D:\JDK\jdk\jre\bin\server\jvm.dll" The service 'Tomcat8' has been installed.