Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
351 views
in Technique[技术] by (71.8m points)

java - Could not find or load main class kafka.admin.TopicCommand

I have an AWS MSK cluster up and running and an Amazon Linux 2 EC2 instance working as a client, with both Java 1.8 and Kafka installed via:

sudo yum install java-1.8.0
wget https://archive.apache.org/dist/kafka/2.2.1/kafka_2.12-2.2.1.tgz 
tar -xzf kafka_2.12-2.2.1.tgz

Trying to create a test topic I navigate to the folder where I unpacked kafka, the contents of which are bin, config and libs, and run this command:

sudo bin/kafka-topics.sh --create --zookeeper "MY_ZOOKEEPER_STRING" --replication-factor 3 --partitions 1 --topic testTopic

It outputs a warning and an error. The warning:

OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N

The error:

`Could not find or load main class kafka.admin.TopicCommand`

Any ideas as to what's happening? I have zero java knowledge so I know this mught sound trivial.

question from:https://stackoverflow.com/questions/65835114/could-not-find-or-load-main-class-kafka-admin-topiccommand

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...