Repository: kafka
Updated Branches:
  refs/heads/trunk 752e53174 -> 81e789ae3


KAFKA-4860; Allow spaces in paths on windows

When we install kafka on path with spaces, batch files were failing, this PR is 
trying to fix this issue.

Author: Vladimír Kleštinec <klesti...@gmail.com>

Reviewers: Vahid Hashemian <vahidhashem...@us.ibm.com>, Jason Gustafson 
<ja...@confluent.io>

Closes #2649 from klesta490/trunk


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

Branch: refs/heads/trunk
Commit: 81e789ae3dc6ea8369db181c5aef440491d74f19
Parents: 752e531
Author: Vladimír Kleštinec <klesti...@gmail.com>
Authored: Tue Sep 5 16:27:08 2017 -0700
Committer: Jason Gustafson <ja...@confluent.io>
Committed: Tue Sep 5 16:27:08 2017 -0700

----------------------------------------------------------------------
 bin/windows/connect-distributed.bat             |  2 +-
 bin/windows/connect-standalone.bat              |  2 +-
 bin/windows/kafka-acls.bat                      |  2 +-
 bin/windows/kafka-configs.bat                   |  2 +-
 bin/windows/kafka-console-consumer.bat          |  2 +-
 bin/windows/kafka-console-producer.bat          |  2 +-
 bin/windows/kafka-consumer-groups.bat           |  2 +-
 bin/windows/kafka-consumer-offset-checker.bat   |  2 +-
 bin/windows/kafka-consumer-perf-test.bat        |  2 +-
 bin/windows/kafka-mirror-maker.bat              |  2 +-
 .../kafka-preferred-replica-election.bat        |  2 +-
 bin/windows/kafka-producer-perf-test.bat        |  2 +-
 bin/windows/kafka-reassign-partitions.bat       |  2 +-
 bin/windows/kafka-replay-log-producer.bat       |  2 +-
 bin/windows/kafka-replica-verification.bat      |  2 +-
 bin/windows/kafka-run-class.bat                 | 65 ++++++++++----------
 bin/windows/kafka-server-start.bat              |  2 +-
 bin/windows/kafka-simple-consumer-shell.bat     |  2 +-
 bin/windows/kafka-topics.bat                    |  2 +-
 bin/windows/zookeeper-server-start.bat          |  2 +-
 bin/windows/zookeeper-shell.bat                 |  2 +-
 21 files changed, 52 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/81e789ae/bin/windows/connect-distributed.bat
----------------------------------------------------------------------
diff --git a/bin/windows/connect-distributed.bat 
b/bin/windows/connect-distributed.bat
index 6ee5c05..aaa3c41 100644
--- a/bin/windows/connect-distributed.bat
+++ b/bin/windows/connect-distributed.bat
@@ -30,5 +30,5 @@ IF ["%KAFKA_LOG4J_OPTS%"] EQU [""] (
        set 
KAFKA_LOG4J_OPTS=-Dlog4j.configuration=file:%BASE_DIR%/config/tools-log4j.properties
 )
 
-%~dp0kafka-run-class.bat org.apache.kafka.connect.cli.ConnectDistributed %*
+"%~dp0kafka-run-class.bat" org.apache.kafka.connect.cli.ConnectDistributed %*
 EndLocal

http://git-wip-us.apache.org/repos/asf/kafka/blob/81e789ae/bin/windows/connect-standalone.bat
----------------------------------------------------------------------
diff --git a/bin/windows/connect-standalone.bat 
b/bin/windows/connect-standalone.bat
index 1a0a564..54cc11f 100644
--- a/bin/windows/connect-standalone.bat
+++ b/bin/windows/connect-standalone.bat
@@ -30,5 +30,5 @@ IF ["%KAFKA_LOG4J_OPTS%"] EQU [""] (
        set 
KAFKA_LOG4J_OPTS=-Dlog4j.configuration=file:%BASE_DIR%/config/tools-log4j.properties
 )
 
-%~dp0kafka-run-class.bat org.apache.kafka.connect.cli.ConnectStandalone %*
+"%~dp0kafka-run-class.bat" org.apache.kafka.connect.cli.ConnectStandalone %*
 EndLocal

http://git-wip-us.apache.org/repos/asf/kafka/blob/81e789ae/bin/windows/kafka-acls.bat
----------------------------------------------------------------------
diff --git a/bin/windows/kafka-acls.bat b/bin/windows/kafka-acls.bat
index 7a78ae8..8f0be85 100644
--- a/bin/windows/kafka-acls.bat
+++ b/bin/windows/kafka-acls.bat
@@ -14,4 +14,4 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
express or implied.
 rem See the License for the specific language governing permissions and
 rem limitations under the License.
 
-%~dp0kafka-run-class.bat kafka.admin.AclCommand %*
+"%~dp0kafka-run-class.bat" kafka.admin.AclCommand %*

http://git-wip-us.apache.org/repos/asf/kafka/blob/81e789ae/bin/windows/kafka-configs.bat
----------------------------------------------------------------------
diff --git a/bin/windows/kafka-configs.bat b/bin/windows/kafka-configs.bat
index 8bbbbfa..3792a5d 100644
--- a/bin/windows/kafka-configs.bat
+++ b/bin/windows/kafka-configs.bat
@@ -14,4 +14,4 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
express or implied.
 rem See the License for the specific language governing permissions and
 rem limitations under the License.
 
-%~dp0kafka-run-class.bat kafka.admin.ConfigCommand %*
+"%~dp0kafka-run-class.bat" kafka.admin.ConfigCommand %*

http://git-wip-us.apache.org/repos/asf/kafka/blob/81e789ae/bin/windows/kafka-console-consumer.bat
----------------------------------------------------------------------
diff --git a/bin/windows/kafka-console-consumer.bat 
b/bin/windows/kafka-console-consumer.bat
index f70f98a..bbbd336 100644
--- a/bin/windows/kafka-console-consumer.bat
+++ b/bin/windows/kafka-console-consumer.bat
@@ -16,5 +16,5 @@ rem limitations under the License.
 
 SetLocal
 set KAFKA_HEAP_OPTS=-Xmx512M
-%~dp0kafka-run-class.bat kafka.tools.ConsoleConsumer %*
+"%~dp0kafka-run-class.bat" kafka.tools.ConsoleConsumer %*
 EndLocal

http://git-wip-us.apache.org/repos/asf/kafka/blob/81e789ae/bin/windows/kafka-console-producer.bat
----------------------------------------------------------------------
diff --git a/bin/windows/kafka-console-producer.bat 
b/bin/windows/kafka-console-producer.bat
index a5b57de..e1834bc 100644
--- a/bin/windows/kafka-console-producer.bat
+++ b/bin/windows/kafka-console-producer.bat
@@ -16,5 +16,5 @@ rem limitations under the License.
 
 SetLocal
 set KAFKA_HEAP_OPTS=-Xmx512M
-%~dp0kafka-run-class.bat kafka.tools.ConsoleProducer %*
+"%~dp0kafka-run-class.bat" kafka.tools.ConsoleProducer %*
 EndLocal

http://git-wip-us.apache.org/repos/asf/kafka/blob/81e789ae/bin/windows/kafka-consumer-groups.bat
----------------------------------------------------------------------
diff --git a/bin/windows/kafka-consumer-groups.bat 
b/bin/windows/kafka-consumer-groups.bat
index b8f3652..e027b9e 100644
--- a/bin/windows/kafka-consumer-groups.bat
+++ b/bin/windows/kafka-consumer-groups.bat
@@ -14,4 +14,4 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
express or implied.
 rem See the License for the specific language governing permissions and
 rem limitations under the License.
 
-%~dp0kafka-run-class.bat kafka.admin.ConsumerGroupCommand %*
+"%~dp0kafka-run-class.bat" kafka.admin.ConsumerGroupCommand %*

http://git-wip-us.apache.org/repos/asf/kafka/blob/81e789ae/bin/windows/kafka-consumer-offset-checker.bat
----------------------------------------------------------------------
diff --git a/bin/windows/kafka-consumer-offset-checker.bat 
b/bin/windows/kafka-consumer-offset-checker.bat
index b6967c4..2baa1b8 100644
--- a/bin/windows/kafka-consumer-offset-checker.bat
+++ b/bin/windows/kafka-consumer-offset-checker.bat
@@ -14,4 +14,4 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
express or implied.
 rem See the License for the specific language governing permissions and
 rem limitations under the License.
 
-%~dp0kafka-run-class.bat kafka.tools.ConsumerOffsetChecker %*
+"%~dp0kafka-run-class.bat" kafka.tools.ConsumerOffsetChecker %*

http://git-wip-us.apache.org/repos/asf/kafka/blob/81e789ae/bin/windows/kafka-consumer-perf-test.bat
----------------------------------------------------------------------
diff --git a/bin/windows/kafka-consumer-perf-test.bat 
b/bin/windows/kafka-consumer-perf-test.bat
index afc2259..606c784 100644
--- a/bin/windows/kafka-consumer-perf-test.bat
+++ b/bin/windows/kafka-consumer-perf-test.bat
@@ -16,5 +16,5 @@ rem limitations under the License.
 
 SetLocal
 set KAFKA_HEAP_OPTS=-Xmx512M -Xms512M
-%~dp0kafka-run-class.bat kafka.tools.ConsumerPerformance %*
+"%~dp0kafka-run-class.bat" kafka.tools.ConsumerPerformance %*
 EndLocal

http://git-wip-us.apache.org/repos/asf/kafka/blob/81e789ae/bin/windows/kafka-mirror-maker.bat
----------------------------------------------------------------------
diff --git a/bin/windows/kafka-mirror-maker.bat 
b/bin/windows/kafka-mirror-maker.bat
index 819e7d8..a1fae45 100644
--- a/bin/windows/kafka-mirror-maker.bat
+++ b/bin/windows/kafka-mirror-maker.bat
@@ -14,4 +14,4 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
express or implied.
 rem See the License for the specific language governing permissions and
 rem limitations under the License.
 
-%~dp0kafka-run-class.bat kafka.tools.MirrorMaker %*
+"%~dp0kafka-run-class.bat" kafka.tools.MirrorMaker %*

http://git-wip-us.apache.org/repos/asf/kafka/blob/81e789ae/bin/windows/kafka-preferred-replica-election.bat
----------------------------------------------------------------------
diff --git a/bin/windows/kafka-preferred-replica-election.bat 
b/bin/windows/kafka-preferred-replica-election.bat
index a9a5b7e..f9f0014 100644
--- a/bin/windows/kafka-preferred-replica-election.bat
+++ b/bin/windows/kafka-preferred-replica-election.bat
@@ -14,4 +14,4 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
express or implied.
 rem See the License for the specific language governing permissions and
 rem limitations under the License.
 
-%~dp0kafka-run-class.bat kafka.admin.PreferredReplicaLeaderElectionCommand %*
+"%~dp0kafka-run-class.bat" kafka.admin.PreferredReplicaLeaderElectionCommand %*

http://git-wip-us.apache.org/repos/asf/kafka/blob/81e789ae/bin/windows/kafka-producer-perf-test.bat
----------------------------------------------------------------------
diff --git a/bin/windows/kafka-producer-perf-test.bat 
b/bin/windows/kafka-producer-perf-test.bat
index 55b024b..917d211 100644
--- a/bin/windows/kafka-producer-perf-test.bat
+++ b/bin/windows/kafka-producer-perf-test.bat
@@ -16,5 +16,5 @@ rem limitations under the License.
 
 SetLocal
 set KAFKA_HEAP_OPTS=-Xmx512M
-%~dp0kafka-run-class.bat org.apache.kafka.tools.ProducerPerformance %*
+"%~dp0kafka-run-class.bat" org.apache.kafka.tools.ProducerPerformance %*
 EndLocal

http://git-wip-us.apache.org/repos/asf/kafka/blob/81e789ae/bin/windows/kafka-reassign-partitions.bat
----------------------------------------------------------------------
diff --git a/bin/windows/kafka-reassign-partitions.bat 
b/bin/windows/kafka-reassign-partitions.bat
index 0c13ee3..62b710d 100644
--- a/bin/windows/kafka-reassign-partitions.bat
+++ b/bin/windows/kafka-reassign-partitions.bat
@@ -14,4 +14,4 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
express or implied.
 rem See the License for the specific language governing permissions and
 rem limitations under the License.
 
-%~dp0kafka-run-class.bat kafka.admin.ReassignPartitionsCommand %*
+"%~dp0kafka-run-class.bat" kafka.admin.ReassignPartitionsCommand %*

http://git-wip-us.apache.org/repos/asf/kafka/blob/81e789ae/bin/windows/kafka-replay-log-producer.bat
----------------------------------------------------------------------
diff --git a/bin/windows/kafka-replay-log-producer.bat 
b/bin/windows/kafka-replay-log-producer.bat
index 2aec326..7b51302 100644
--- a/bin/windows/kafka-replay-log-producer.bat
+++ b/bin/windows/kafka-replay-log-producer.bat
@@ -14,4 +14,4 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
express or implied.
 rem See the License for the specific language governing permissions and
 rem limitations under the License.
 
-%~dp0kafka-run-class.bat kafka.tools.ReplayLogProducer %*
+"%~dp0kafka-run-class.bat" kafka.tools.ReplayLogProducer %*

http://git-wip-us.apache.org/repos/asf/kafka/blob/81e789ae/bin/windows/kafka-replica-verification.bat
----------------------------------------------------------------------
diff --git a/bin/windows/kafka-replica-verification.bat 
b/bin/windows/kafka-replica-verification.bat
index 481db57..bf4805d 100644
--- a/bin/windows/kafka-replica-verification.bat
+++ b/bin/windows/kafka-replica-verification.bat
@@ -14,4 +14,4 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
express or implied.
 rem See the License for the specific language governing permissions and
 rem limitations under the License.
 
-%~dp0kafka-run-class.bat kafka.tools.ReplicaVerificationTool %*
+"%~dp0kafka-run-class.bat" kafka.tools.ReplicaVerificationTool %*

http://git-wip-us.apache.org/repos/asf/kafka/blob/81e789ae/bin/windows/kafka-run-class.bat
----------------------------------------------------------------------
diff --git a/bin/windows/kafka-run-class.bat b/bin/windows/kafka-run-class.bat
index 0cea800..0c2d4bd 100755
--- a/bin/windows/kafka-run-class.bat
+++ b/bin/windows/kafka-run-class.bat
@@ -43,60 +43,60 @@ IF ["%SCALA_BINARY_VERSION%"] EQU [""] (
 )
 
 rem Classpath addition for kafka-core dependencies
-for %%i in (%BASE_DIR%\core\build\dependant-libs-%SCALA_VERSION%\*.jar) do (
-       call :concat %%i
+for %%i in ("%BASE_DIR%\core\build\dependant-libs-%SCALA_VERSION%\*.jar") do (
+       call :concat "%%i"
 )
 
 rem Classpath addition for kafka-examples
-for %%i in (%BASE_DIR%\examples\build\libs\kafka-examples*.jar) do (
-       call :concat %%i
+for %%i in ("%BASE_DIR%\examples\build\libs\kafka-examples*.jar") do (
+       call :concat "%%i"
 )
 
 rem Classpath addition for kafka-clients
-for %%i in (%BASE_DIR%\clients\build\libs\kafka-clients*.jar) do (
-       call :concat %%i
+for %%i in ("%BASE_DIR%\clients\build\libs\kafka-clients*.jar") do (
+       call :concat "%%i"
 )
 
 rem Classpath addition for kafka-streams
-for %%i in (%BASE_DIR%\streams\build\libs\kafka-streams*.jar) do (
-       call :concat %%i
+for %%i in ("%BASE_DIR%\streams\build\libs\kafka-streams*.jar") do (
+       call :concat "%%i"
 )
 
 rem Classpath addition for kafka-streams-examples
-for %%i in 
(%BASE_DIR%\streams\examples\build\libs\kafka-streams-examples*.jar) do (
-       call :concat %%i
+for %%i in 
("%BASE_DIR%\streams\examples\build\libs\kafka-streams-examples*.jar") do (
+       call :concat "%%i"
 )
 
-for %%i in 
(%BASE_DIR%\streams\build\dependant-libs-%SCALA_VERSION%\rocksdb*.jar) do (
-       call :concat %%i
+for %%i in 
("%BASE_DIR%\streams\build\dependant-libs-%SCALA_VERSION%\rocksdb*.jar") do (
+       call :concat "%%i"
 )
 
 rem Classpath addition for kafka tools
-for %%i in (%BASE_DIR%\tools\build\libs\kafka-tools*.jar) do (
-       call :concat %%i
+for %%i in ("%BASE_DIR%\tools\build\libs\kafka-tools*.jar") do (
+       call :concat "%%i"
 )
 
-for %%i in (%BASE_DIR%\tools\build\dependant-libs-%SCALA_VERSION%\*.jar) do (
-       call :concat %%i
+for %%i in ("%BASE_DIR%\tools\build\dependant-libs-%SCALA_VERSION%\*.jar") do (
+       call :concat "%%i"
 )
 
 for %%p in (api runtime file json tools) do (
-       for %%i in (%BASE_DIR%\connect\%%p\build\libs\connect-%%p*.jar) do (
-               call :concat %%i
+       for %%i in ("%BASE_DIR%\connect\%%p\build\libs\connect-%%p*.jar") do (
+               call :concat "%%i"
        )
        if exist "%BASE_DIR%\connect\%%p\build\dependant-libs\*" (
-               call :concat %BASE_DIR%\connect\%%p\build\dependant-libs\*
+               call :concat "%BASE_DIR%\connect\%%p\build\dependant-libs\*"
        )
 )
 
 rem Classpath addition for release
-for %%i in (%BASE_DIR%\libs\*) do (
-       call :concat %%i
+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 (
-       call :concat %%i
+for %%i in ("%BASE_DIR%\core\build\libs\kafka_%SCALA_BINARY_VERSION%*.jar") do 
(
+       call :concat "%%i"
 )
 
 rem JMX settings
@@ -111,7 +111,7 @@ IF ["%JMX_PORT%"] NEQ [""] (
 
 rem Log directory to use
 IF ["%LOG_DIR%"] EQU [""] (
-    set LOG_DIR=%BASE_DIR%/logs
+    set LOG_DIR="%BASE_DIR~%/logs"
 )
 
 rem Log4j settings
@@ -119,12 +119,12 @@ IF ["%KAFKA_LOG4J_OPTS%"] EQU [""] (
        set 
KAFKA_LOG4J_OPTS=-Dlog4j.configuration=file:%BASE_DIR%/config/tools-log4j.properties
 ) ELSE (
   rem create logs directory
-  IF not exist %LOG_DIR% (
-      mkdir %LOG_DIR%
+  IF not exist "%LOG_DIR%" (
+      mkdir "%LOG_DIR%"
   )
 )
 
-set KAFKA_LOG4J_OPTS=-Dkafka.logs.dir=%LOG_DIR% %KAFKA_LOG4J_OPTS%
+set KAFKA_LOG4J_OPTS=-Dkafka.logs.dir="%LOG_DIR%" "%KAFKA_LOG4J_OPTS%"
 
 rem Generic jvm settings you want to add
 IF ["%KAFKA_OPTS%"] EQU [""] (
@@ -171,22 +171,21 @@ IF ["%KAFKA_JVM_PERFORMANCE_OPTS%"] EQU [""] (
        set KAFKA_JVM_PERFORMANCE_OPTS=-server -XX:+UseG1GC 
-XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 
-XX:ExplicitGCInvokesConcurrent -Djava.awt.headless=true
 )
 
-IF ["%CLASSPATH%"] EQU [""] (
+IF not defined CLASSPATH (
        echo Classpath is empty. Please build the project first e.g. by running 
'gradlew jarAll'
        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.
-
 %COMMAND%
 
 goto :eof
 :concat
-IF ["%CLASSPATH%"] EQU [""] (
-  set "CLASSPATH=%1"
+IF not defined CLASSPATH (
+  set CLASSPATH="%~1"
 ) ELSE (
-  set "CLASSPATH=%CLASSPATH%;%1"
+  set CLASSPATH=%CLASSPATH%;"%~1"
 )

http://git-wip-us.apache.org/repos/asf/kafka/blob/81e789ae/bin/windows/kafka-server-start.bat
----------------------------------------------------------------------
diff --git a/bin/windows/kafka-server-start.bat 
b/bin/windows/kafka-server-start.bat
index 1aa859c..8624eda 100644
--- a/bin/windows/kafka-server-start.bat
+++ b/bin/windows/kafka-server-start.bat
@@ -34,5 +34,5 @@ IF ["%KAFKA_HEAP_OPTS%"] EQU [""] (
         set KAFKA_HEAP_OPTS=-Xmx1G -Xms1G
     )
 )
-%~dp0kafka-run-class.bat kafka.Kafka %*
+"%~dp0kafka-run-class.bat" kafka.Kafka %*
 EndLocal

http://git-wip-us.apache.org/repos/asf/kafka/blob/81e789ae/bin/windows/kafka-simple-consumer-shell.bat
----------------------------------------------------------------------
diff --git a/bin/windows/kafka-simple-consumer-shell.bat 
b/bin/windows/kafka-simple-consumer-shell.bat
index 4e6ea0c..8836128 100644
--- a/bin/windows/kafka-simple-consumer-shell.bat
+++ b/bin/windows/kafka-simple-consumer-shell.bat
@@ -14,4 +14,4 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
express or implied.
 rem See the License for the specific language governing permissions and
 rem limitations under the License.
 
-%~dp0kafka-run-class.bat kafka.tools.SimpleConsumerShell %*
+"%~dp0kafka-run-class.bat" kafka.tools.SimpleConsumerShell %*

http://git-wip-us.apache.org/repos/asf/kafka/blob/81e789ae/bin/windows/kafka-topics.bat
----------------------------------------------------------------------
diff --git a/bin/windows/kafka-topics.bat b/bin/windows/kafka-topics.bat
index f1a9e64..677b09d 100644
--- a/bin/windows/kafka-topics.bat
+++ b/bin/windows/kafka-topics.bat
@@ -14,4 +14,4 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
express or implied.
 rem See the License for the specific language governing permissions and
 rem limitations under the License.
 
-%~dp0kafka-run-class.bat kafka.admin.TopicCommand %*
+"%~dp0kafka-run-class.bat" kafka.admin.TopicCommand %*

http://git-wip-us.apache.org/repos/asf/kafka/blob/81e789ae/bin/windows/zookeeper-server-start.bat
----------------------------------------------------------------------
diff --git a/bin/windows/zookeeper-server-start.bat 
b/bin/windows/zookeeper-server-start.bat
index c67b997..f201a58 100644
--- a/bin/windows/zookeeper-server-start.bat
+++ b/bin/windows/zookeeper-server-start.bat
@@ -26,5 +26,5 @@ IF ["%KAFKA_LOG4J_OPTS%"] EQU [""] (
 IF ["%KAFKA_HEAP_OPTS%"] EQU [""] (
     set KAFKA_HEAP_OPTS=-Xmx512M -Xms512M
 )
-%~dp0kafka-run-class.bat org.apache.zookeeper.server.quorum.QuorumPeerMain %*
+"%~dp0kafka-run-class.bat" org.apache.zookeeper.server.quorum.QuorumPeerMain %*
 EndLocal

http://git-wip-us.apache.org/repos/asf/kafka/blob/81e789ae/bin/windows/zookeeper-shell.bat
----------------------------------------------------------------------
diff --git a/bin/windows/zookeeper-shell.bat b/bin/windows/zookeeper-shell.bat
index e98f069..ea3c398 100644
--- a/bin/windows/zookeeper-shell.bat
+++ b/bin/windows/zookeeper-shell.bat
@@ -19,4 +19,4 @@ IF [%1] EQU [] (
        EXIT /B 1
 )
 
-%~dp0kafka-run-class.bat org.apache.zookeeper.ZooKeeperMain -server %*
+"%~dp0kafka-run-class.bat" org.apache.zookeeper.ZooKeeperMain -server %*

Reply via email to