This is an automated email from the ASF dual-hosted git repository.
lihan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new 2ee1135c46 Fix BZ 66507 - Catalina version command not honoring
JAVA_OPTS variable
2ee1135c46 is described below
commit 2ee1135c46654ff366b50077ef0bce7090666dfa
Author: lihan <[email protected]>
AuthorDate: Tue Mar 7 11:38:51 2023 +0800
Fix BZ 66507 - Catalina version command not honoring JAVA_OPTS variable
Patch suggested by Eric Hamilton
https://bz.apache.org/bugzilla/show_bug.cgi?id=66507
---
bin/catalina.bat | 2 +-
bin/catalina.sh | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/bin/catalina.bat b/bin/catalina.bat
index 068cd283bc..6350932852 100755
--- a/bin/catalina.bat
+++ b/bin/catalina.bat
@@ -304,7 +304,7 @@ set CATALINA_OPTS=
goto execCmd
:doVersion
-%_EXECJAVA% -classpath "%CATALINA_HOME%\lib\catalina.jar"
org.apache.catalina.util.ServerInfo
+%_EXECJAVA% %JAVA_OPTS% -classpath "%CATALINA_HOME%\lib\catalina.jar"
org.apache.catalina.util.ServerInfo
goto end
diff --git a/bin/catalina.sh b/bin/catalina.sh
index a7b14b6957..33649fac27 100755
--- a/bin/catalina.sh
+++ b/bin/catalina.sh
@@ -562,9 +562,9 @@ elif [ "$1" = "configtest" ] ; then
elif [ "$1" = "version" ] ; then
- "$_RUNJAVA" \
- -classpath "$CATALINA_HOME/lib/catalina.jar" \
- org.apache.catalina.util.ServerInfo
+ eval "\"$_RUNJAVA\"" "$JAVA_OPTS" \
+ -classpath "\"$CATALINA_HOME/lib/catalina.jar\"" \
+ org.apache.catalina.util.ServerInfo
else
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]