Tomcat startup error Summary

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.