Tomcat
---------
这个问题挺常见的。主要是。
JAVA_HOME should point to a JDK not a JRE
百度了一下,发现有许多解决办法。有些能行有些不行。因人而异。
这里说一下,觉得比较有效的办法。
----------
JAVA_HOME should point to a JDK not a JRE
首先想到和 JAVA_HOME 有关。
于是CMD。
输入 if not exist "%JRE_HOME%injava.exe" echo no jre java 回车
结果:no jre java
再输入 if not exist "%JAVA_HOME%injava.exe" echo no jdk java 回车
结果:no jdk java
//环境变量没有java jre and java jdk。
最后输入 if not exist "%JAVA_HOME%injava.exe" echo "%JAVA_HOME%injava.exe" 回车
结果:"C:Program FilesJava;injava.exe"
//发现什么没有。唔,多了分号。
赶快去JAVA_HOME里,把 C:Program FilesJava; 改成 C:Program FilesJava (去掉分号)
再CMD。
输入 if not exist "%JAVA_HOME%injava.exe" echo "%JAVA_HOME%injava.exe" 回车
结果:"C:Program FilesJavainjava.exe"
OK。搞定。运行 startup.bat 吧。