1. When startup. bat in tomcat is started, the following error is always reported:
The java_home environment variable is not defined correctly
This environment variable is needed to run this program
NB: java_home shocould point to a jdk not a jre
Solution: first, make sure that the jdk environment variables are correctly set;
Set environment variables:
Right-click my computer --> properties --> advanced --> environment variable --> Find the JAVA_HOME variable and point the path to the jdk installation directory, for example:
Variable name: JAVA_HOME
Variable value: C: \ Program Files \ Java \ jdk1_07;
Variable name: Path
Variable value: C: \ Program Files \ Java \ jdk1_07 \ bin;
Variable name: classpath
Variable value :.;
If the environment variable is correct, this error is still reported; modify the setclasspath. bat file in Tomcat;
Go to the bin directory of tomcat, open the setclasspath. bat file, and change the place where the JAVA_HOME path is set in the file to the JDK installation directory. After the modification, the problem is solved.