Shubham gupta
Shubham gupta

Reputation: 681

Error: Could not find or load main class files\kafka_2.12-2.4.0\libs\activation-1.1.1.jar;

Error: Could not find or load main class files\kafka_2.12-2.4.0\libs\activation-1.1.1.jar;

Upvotes: 0

Views: 2193

Answers (2)

VenkiTechieJava
VenkiTechieJava

Reputation: 1

  1. Need to check JAVA_HOME, whether java installed & correct classpath or not

  2. Zookeeper path need to check, especially folder name should not have spaces. eg: Program Files--> use folder like zookeeper or any Program_Files

  3. Better to place kafka and zookeeper server folders in C drive not in Program Files folder

  4. Before run zookeeper command, 1st set javahome path on cmd C:\kafka\bin\windows>set JAVA_HOME=C:\Program Files\Java\jdk-17

  5. Then run the zookeepr cmd C:\kafka\bin\windows>zookeeper-server-start.bat zookeeper.properties

100% it will work. I did not get any where this answer that I searched. After I trouble shooted for 3 hours I got resolved this issue. It will work.

Upvotes: 0

OneCricketeer
OneCricketeer

Reputation: 191711

It would appear you may have put Kafka in "Program files" directory.

On windows, the kafka path cannot contain spaces. Try c:\kafka

Upvotes: 16

Related Questions