Ok, it’s finally not complicated 🙂
The only steps are:
Edit (2021/10) Latest versions of Kafka end up with an AccessDeniedException
upon startup, and even when successfully started, throw the same error during log rotation. Kafka utilizes Java methods designed for Unix filesystem libraries, so installing Kafka in WSL2 is recommended.
Old answer
If using Cygwin, edit \bin\kafka-run-class.sh
and at the end of the file, change
`exec $JAVA $KAFKA_HEAP_OPTS $KAFKA_JVM_PERFORMANCE_OPTS $KAFKA_GC_LOG_OPTS $KAFKA_JMX_OPTS $KAFKA_LOG4J_OPTS -cp $CLASSPATH $KAFKA_OPTS "$@"`
to
``exec java $KAFKA_HEAP_OPTS $KAFKA_JVM_PERFORMANCE_OPTS $KAFKA_GC_LOG_OPTS $KAFKA_JMX_OPTS $KAFKA_LOG4J_OPTS -cp `cygpath -wp $CLASSPATH` $KAFKA_OPTS "$@"``
- In Environment Variables, Add java to your Path System Variable:
That’s it.. you can now run ZooKeeper and Kafka servers and start playing with topics and stuff..