tomcat is a lightweight web application server, the installation we are directly extract the zip package, then double-click startup.bat in the bin directory can be started (of course, that local jdk to install and configure the JAVA_HOME environment variable)
So I always thought that tomcat is not configured environment variables
But after decompression colleagues today, the following tips are always running startup.bat
Later, after configuring the environment variables CATALINA_HOME and CATALINA_BASE on it
I was very surprised, and obviously I have not used before the environment variables ah
After a review of relevant information, to find the problem
I always directly between the input cmd in the bin directory, which is cmd window opens in the bin directory
Then I used the startup.bat directly onto the cmd window, so that you can start properly, because the current path is the path cmd window where the command startup.bat
So, the reason why the above need to configure the environment variable, because the current path cmd window is the C drive, the path is not a command
Here a look at startup.bat
setlocal is to start localization of environment variables in a batch file, it is equivalent to setting a temporary environment variables
This command is valid to appear endlocal command or batch file till it reaches the end
rem on behalf of the comment, look at the first line comments, if CATALINA_HOME is not defined, then guess!
----------------------------------------------------------------------------------------------
CURRENT_DIR set the variable value of the current working path ......
After the operation is to give specific environment variable assignment
So, when tomcat starts will set your temporary environment variables, you do not have to configure