gpt4 book ai didi

java - 找不到 Tomcat 7 setenv.sh

转载 作者:太空狗 更新时间:2023-10-29 22:32:08 24 4
gpt4 key购买 nike

我下载并解压了 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"

http://tomcat.apache.org/tomcat-7.0-doc/RUNNING.txt

关于java - 找不到 Tomcat 7 setenv.sh,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9480210/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com