You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Tomas Kovan (Jira)" <ji...@apache.org> on 2020/03/12 08:01:00 UTC
[jira] [Created] (KAFKA-9710) Windows kafka-server-start.bat script
fails when Kafka is located in path with whitespace
Tomas Kovan created KAFKA-9710:
----------------------------------
Summary: Windows kafka-server-start.bat script fails when Kafka is located in path with whitespace
Key: KAFKA-9710
URL: https://issues.apache.org/jira/browse/KAFKA-9710
Project: Kafka
Issue Type: Bug
Components: tools
Affects Versions: 2.4.0
Reporter: Tomas Kovan
Fix For: 2.4.0
Attachments: kafka_image.png
*Steps to reproduce:*
On Windows when you place Kafka to directory path with space, for example "C:\kafka path with whitespace" in it and run ".\bin\windows\kafka-server-start.bat", script will fail with error message "Error: Could not find or load main class path" (example in image).
*Possible solution:*
Working solution is to remove double quotes around %CLASSPATH% variable in "kafka-run-class.bat" since all paths included in %CLASSPATH% variable already includes double quotes around them. So changing line 179 in file "kafka-run-class.bat"
FROM:
{code:java}
set COMMAND=%JAVA% %KAFKA_HEAP_OPTS% %KAFKA_JVM_PERFORMANCE_OPTS% %KAFKA_JMX_OPTS% %KAFKA_LOG4J_OPTS% -cp "%CLASSPATH%" %KAFKA_OPTS% %*
{code}
TO:
{code:java}
set COMMAND=%JAVA% %KAFKA_HEAP_OPTS% %KAFKA_JVM_PERFORMANCE_OPTS% %KAFKA_JMX_OPTS% %KAFKA_LOG4J_OPTS% -cp %CLASSPATH% %KAFKA_OPTS% %*
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)