# The input line is too long. The syntax of the command is incorrect

While starting Apache Kafka you may get an error like The input line is too long. The syntax of the command is incorrect due to Apache Kafka folder path is too long. Apache Kafka setting the CLASSPATH of dependencies of Kafka libraries. We have two ways to start the Apache Kafka server without this error. The error you get in the windows system but may not get in the Linux.

Here We will discuss how to fix the error in the windows system.

1. Apache Kafka Path length needs to be decreased
2. By changing the kafka-run-class.bat for dependencies.

# Apache Kafka Path length needs to be decreased

To decrease the Apache Kafka path, you have to install apache Kafka in the C:/ Drive or D:/ Drive. like as follows.

C:\Kafka\

or

D:\Kafka\

# By changing the kafka-run-class.bat for dependencies.

Go to kafka-run-class.bat file and the path is <Kafk-Home>/bin/windows/kafka-run-class.bat

Replace

```for %%i in ("%BASE_DIR%\libs\*") do (
call :concat "%%i"
)```

by

`call :concat "%BASE_DIR%\libs\*;"`

Apache-Kafka-Path-Too-Long

# References

https://stackoverflow.com/questions/48834927/the-input-line-is-too-long-when-starting-kafka