我下载并解压了 apache-tomcat-7.0 .根据 RUNNING.txt (%CATALINA_BASE%/RUNNING.txt) 中的说明,它应该在“setenv.sh”文件中设置 JRE_HOME。
这个文件在哪里?文档说,它将在 CATALINA_HOME/bin 目录中。但是,该文件不存在。
最佳答案
文档确实提到了setenv.(sh|bat)
文件的缺失:
(3.4) Using the "setenv" script (optional, recommended)
Apart from CATALINA_HOME and CATALINA_BASE, all environment variables can
be specified in the "setenv" script. The script is placed either into
CATALINA_BASE/bin or into CATALINA_HOME/bin directory and is named
setenv.bat (on Windows) or setenv.sh (on *nix). The file has to be
readable.
By default the setenv script file is absent. If the script file is present
both in CATALINA_BASE and in CATALINA_HOME, the one in CATALINA_BASE is
preferred
For example, to configure the JRE_HOME and CATALINA_PID variables you can
create the following script file:
On Windows, %CATALINA_BASE%\bin\setenv.bat:
set "JRE_HOME=%ProgramFiles%\Java\jre6"
exit /b 0
On *nix, $CATALINA_BASE/bin/setenv.sh:
JRE_HOME=/usr/java/latest
CATALINA_PID="$CATALINA_BASE/tomcat.pid"
关于java - 找不到 Tomcat 7 setenv.sh,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9480210/