MINOR: Update kafka-run-class.bat to handle spaces in classpath
handle existing classpath with spaces
list each lib dependency individually
Author: Jon Freedman
Reviewers: Guozhang Wang
Closes from jonfreedman/trunk
@@ -90,7 +90,9 @@ for %%p in (api runtime file json tools) do (
)
rem Classpath addition for release
-call :concat %BASE_DIR%\libs\*
+for %%i in (%BASE_DIR%\libs\*) do (
+ call :concat %%i
+)
rem Classpath addition for core
for %%i in (%BASE_DIR%\core\build\libs\kafka_%SCALA_BINARY_VERSION%*.jar) do (
@@ -174,7 +176,7 @@ IF ["%CLASSPATH%"] EQU [""] (
EXIT /B 2
)
-set COMMAND=%JAVA% %KAFKA_HEAP_OPTS% %KAFKA_JVM_PERFORMANCE_OPTS% %KAFKA_JMX_OPTS% %KAFKA_LOG4J_OPTS% -cp %CLASSPATH% %KAFKA_OPTS% %*
+set COMMAND=%JAVA% %KAFKA_HEAP_OPTS% %KAFKA_JVM_PERFORMANCE_OPTS% %KAFKA_JMX_OPTS% %KAFKA_LOG4J_OPTS% -cp "%CLASSPATH%" %KAFKA_OPTS% %*
rem echo.
rem echo %COMMAND%
rem echo.
@@ -184,7 +186,7 @@ rem echo.
goto :eof
:concat
IF ["%CLASSPATH%"] EQU [""] (
- set CLASSPATH="%1"
+ set "CLASSPATH=%1"
) ELSE (
- set CLASSPATH=%CLASSPATH%;"%1"
+ set "CLASSPATH=%CLASSPATH%;%1"
)
