Repository: kafka
Updated Branches:
  refs/heads/0.10.2 e2cc88602 -> 1f4f9c74c


MINOR: Update kafka-run-class.bat to handle spaces in classpath

handle existing classpath with spaces
list each lib dependency individually

Author: Jon Freedman <[email protected]>

Reviewers: Guozhang Wang <[email protected]>

Closes #2433 from jonfreedman/trunk

(cherry picked from commit dc4d1bb81b37908725e3bcefd21bade9c2297ebd)
Signed-off-by: Guozhang Wang <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/1f4f9c74
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/1f4f9c74
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/1f4f9c74

Branch: refs/heads/0.10.2
Commit: 1f4f9c74c1a42bb9ef84e5ef45a7fe175302e73b
Parents: e2cc886
Author: Jon Freedman <[email protected]>
Authored: Thu Jan 26 14:17:09 2017 -0800
Committer: Guozhang Wang <[email protected]>
Committed: Thu Jan 26 14:17:18 2017 -0800

----------------------------------------------------------------------
 bin/windows/kafka-run-class.bat | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/1f4f9c74/bin/windows/kafka-run-class.bat
----------------------------------------------------------------------
diff --git a/bin/windows/kafka-run-class.bat b/bin/windows/kafka-run-class.bat
index 4f85301..23263b2 100755
--- a/bin/windows/kafka-run-class.bat
+++ b/bin/windows/kafka-run-class.bat
@@ -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"
 )

Reply via email to