Not able to produce message to Kafka topic


Can someone please help me produce messages to kafka topic from Java code. Wrote a simple Java Program to produce messages to Kafka topic
Ran the below command from command line to produce the messages

java -cp .:slf4j.jar:kafka-clients- com.kafka.produce.ProduceMessage

Exception in thread “main” java.lang.NoClassDefFoundError: ch/qos/logback/core/joran/spi/JoranException
at org.slf4j.LoggerFactory.getSingleton(
at org.slf4j.LoggerFactory.bind(
at org.slf4j.LoggerFactory.performInitialization(
at org.slf4j.LoggerFactory.getILoggerFactory(
at org.slf4j.LoggerFactory.getLogger(
at org.slf4j.LoggerFactory.getLogger(
at org.apache.kafka.clients.producer.KafkaProducer.(
at com.kafka.produce.ProduceMessage.main(