You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2023/08/03 18:36:04 UTC
[tomcat] branch 9.0.x updated: Fix BZ 66829 - fix quoting
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new f107b3c1b7 Fix BZ 66829 - fix quoting
f107b3c1b7 is described below
commit f107b3c1b72e09e105b4d2b7ae97d341ac7e58c6
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Aug 3 19:32:44 2023 +0100
Fix BZ 66829 - fix quoting
https://bz.apache.org/bugzilla/show_bug.cgi?id=66829
---
bin/catalina.bat | 10 +++++-----
bin/setclasspath.bat | 4 ++--
webapps/docs/changelog.xml | 5 +++++
3 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/bin/catalina.bat b/bin/catalina.bat
index 84a5f39b48..05704d6115 100755
--- a/bin/catalina.bat
+++ b/bin/catalina.bat
@@ -96,7 +96,7 @@ rem "-Djdk.tls.ephemeralDHKeySize=2048"
rem
rem CATALINA_LOGGING_CONFIG (Optional) Override Tomcat's logging config file
rem Example (all one line)
-rem set CATALINA_LOGGING_CONFIG="-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties"
+rem set CATALINA_LOGGING_CONFIG=-Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties"
rem
rem LOGGING_CONFIG Deprecated
rem Use CATALINA_LOGGING_CONFIG
@@ -105,7 +105,7 @@ rem and LOGGING_CONFIG starts with "-D..."
rem
rem LOGGING_MANAGER (Optional) Override Tomcat's logging manager
rem Example (all one line)
-rem set LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
+rem set LOGGING_MANAGER=-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
rem
rem TITLE (Optional) Specify the title of Tomcat window. The default
rem TITLE is Tomcat if it's not specified.
@@ -270,7 +270,7 @@ echo Using JAVA_HOME: "%JAVA_HOME%"
echo Using CLASSPATH: "%CLASSPATH%"
echo Using CATALINA_OPTS: "%CATALINA_OPTS%"
-set _EXECJAVA=%_RUNJAVA%
+set _EXECJAVA="%_RUNJAVA%"
set MAINCLASS=org.apache.catalina.startup.Bootstrap
set ACTION=start
set SECURITY_POLICY_FILE=
@@ -317,7 +317,7 @@ goto end
:doDebug
shift
-set _EXECJAVA=%_RUNJDB%
+set _EXECJAVA="%_RUNJDB%"
set DEBUG_OPTS=-sourcepath "%CATALINA_HOME%\..\..\java"
if not ""%1"" == ""-security"" goto execCmd
shift
@@ -336,7 +336,7 @@ goto execCmd
:doStart
shift
if "%TITLE%" == "" set TITLE=Tomcat
-set _EXECJAVA=start "%TITLE%" %_RUNJAVA%
+set _EXECJAVA=start "%TITLE%" "%_RUNJAVA%"
if not ""%1"" == ""-security"" goto execCmd
shift
echo Using Security Manager
diff --git a/bin/setclasspath.bat b/bin/setclasspath.bat
index 1fa46de7d0..bd3a2f1a9d 100755
--- a/bin/setclasspath.bat
+++ b/bin/setclasspath.bat
@@ -87,13 +87,13 @@ rem Don't override _RUNJAVA if the user has set it previously
if not "%_RUNJAVA%" == "" goto gotRunJava
rem Set standard command for invoking Java.
rem Also note the quoting as JRE_HOME may contain spaces.
-set _RUNJAVA="%JRE_HOME%\bin\java.exe"
+set "_RUNJAVA=%JRE_HOME%\bin\java.exe"
:gotRunJava
rem Don't override _RUNJDB if the user has set it previously
rem Also note the quoting as JAVA_HOME may contain spaces.
if not "%_RUNJDB%" == "" goto gotRunJdb
-set _RUNJDB="%JAVA_HOME%\bin\jdb.exe"
+set "_RUNJDB=%JAVA_HOME%\bin\jdb.exe"
:gotRunJdb
goto end
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 997a2f4434..79f3ca2f55 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -194,6 +194,11 @@
Improvements to Japanese translations. Contributed by tak7iji and
Shirayuking. (markt)
</add>
+ <fix>
+ <bug>66829</bug>: Fix quoting so users can use the <code>_RUNJAVA</code>
+ environment variable as intended on Windows when the path to the Java
+ executable contains spaces. (markt)
+ </fix>
</changelog>
</subsection>
</section>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org