Skip to content

Commit

Permalink
Fix BZ 66829 - fix quoting
Browse files Browse the repository at this point in the history
  • Loading branch information
markt-asf committed Aug 3, 2023
1 parent 8618c29 commit 6f4b064
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
10 changes: 5 additions & 5 deletions bin/catalina.bat
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ 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_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.
Expand Down Expand Up @@ -234,7 +234,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 DEBUG_OPTS=
Expand Down Expand Up @@ -277,7 +277,7 @@ goto end

:doDebug
shift
set _EXECJAVA=%_RUNJDB%
set _EXECJAVA="%_RUNJDB%"
set DEBUG_OPTS=-sourcepath "%CATALINA_HOME%\..\..\java"
goto execCmd

Expand All @@ -288,7 +288,7 @@ goto execCmd
:doStart
shift
if "%TITLE%" == "" set TITLE=Tomcat
set _EXECJAVA=start "%TITLE%" %_RUNJAVA%
set _EXECJAVA=start "%TITLE%" "%_RUNJAVA%"
goto execCmd

:doStop
Expand Down
4 changes: 2 additions & 2 deletions bin/setclasspath.bat
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,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
Expand Down
5 changes: 5 additions & 0 deletions webapps/docs/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,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>
Expand Down

0 comments on commit 6f4b064

Please sign in to comment.