In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to solve the problem that tomcat starts startup.bat in a flash, which is very detailed and has certain reference value. Interested friends must finish reading it!
After many times of running startup.bat, a window flashed, but never corrected how to modify the configuration is correct. The information you can see from the Internet is as follows:
When tomcat starts, it reads the information of environment variables and needs the information of CATALINA_HOME and JAVA_HOME. CATALINA_HOME is the home directory of tomcat, JAVA_HOME is the home directory of java installation, and home directory of jdk.
First, to configure JAVA_HOME at the environment variable, note that the variable value is the home directory of jdk, not the bin directory, and do not add a semicolon, as shown in the figure:
Then, if you configure startup.bat like this, you can right-click startup.bat, edit, click pause at the end of the text, save and rerun startup.bat, then the window will no longer flash by, but stay on the desktop (debug successfully, remove pause).
If there is an error message, it will be displayed at this time. You can search the Internet for the corresponding solution according to its error prompt. Here are the problems encountered in the error prompt window:
1. Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
Tomcat's startup.bat, which calls catalina.bat, while catalina.bat calls setclasspath.bat, just declare the environment variable at the beginning of the setclasspath.bat (two lines in red), because the environment variable JAVA_HOME,JRE_HOME is not automatically registered after the newer version is installed.
Add a red mark to the beginning of the setclasspath.bat, as follows:
Rem-rem Set CLASSPATH and Java optionsremrem $Id: setclasspath.bat 505241 2007-02-09 10 Id 22 setclasspath.bat 58Z jfclere $rem- -set JAVA_HOME=C:\ Program Files\ Java\ jdk1.6.0_20set JRE_HOME=C:\ Program Files\ Java\ jre6rem Make sure prerequisite environment variables are setif not "% JAVA_HOME%" = "" goto gotJdkHomeif not "% JRE_HOME%" = "" goto gotJreHomeecho Neither the JAVA " _ HOME nor the JRE_HOME environment variable is definedecho At least one of these environment variable is needed to run this programgoto exit
This automatically registers JAVA_HOME,JRE_HOME every time you run startup.bat.
Running startup.bat prompts the "info: Server startup in xxxxx ms" OK to be done.
Attention!
Server.xml configuration file, the correct composition of the Connector node is as follows. If it has been modified here, it must be checked carefully, otherwise starting startup.bat will flash by.
The above is all the contents of this article entitled "how to solve the fleeting problem of tomcat starting startup.bat". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.