Click here to Skip to main content
15,868,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to write a java program in Eclipse editor. For this reason i want to add kfka third party library. I add this line in top of the program

import kafka.javaapi.producer.Producer;

but it giving me error.

"The import kafka cannot be resolved. ".
I am new to java and eclipse, searching for the solution from last 1 day.

What I have tried:

I downloaded Jar file from here, and added it to Project using
Properties -> Java Build Path -> Add External Jar
But still getting the same error.
Posted
Updated 12-Feb-19 21:02pm

1 solution

Possibly there is a mismatch between your code and the jar you downloaded, see api - what's the difference between kafka.javaapi.* and org.apache.kafka.*? - Stack Overflow[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900