You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Sa Li <sa...@gmail.com> on 2014/10/02 21:01:43 UTC

can't run kafka example code

Hi, all

Here I want to run example code associated with kafka package, I run as
readme says:

To run the demo using scripts:
+
+   1. Start Zookeeper and the Kafka server
+   2. For simple consumer demo, run bin/java-simple-consumer-demo.sh
+   3. For unlimited producer-consumer run, run
bin/java-producer-consumer-demo.sh

but I got such error,

:bin/../../project/boot/scala-2.8.0/lib/*.jar:bin/../../core/lib_managed/scala_2.8.0/compile/*.jar:bin/../../core/lib/*.jar:bin/../../core/target/scala_2.8.0/
*.jar:bin/../../examples/target/scala_2.8.0/*.jar

 Error: Could not find or load main class kafka.examples.SimpleConsumerDemo

But I already build the package under kafka directory, I can see the
class in examples/target/classes/kafka/examples


Any idea about this issue?


thanks




-- 

Alec Li

Re: can't run kafka example code

Posted by Jun Rao <ju...@gmail.com>.
Can you follow the example in quickstart (
http://kafka.apache.org/documentation.html#quickstart)?

Thanks,

Jun

On Thu, Oct 2, 2014 at 12:01 PM, Sa Li <sa...@gmail.com> wrote:

> Hi, all
>
> Here I want to run example code associated with kafka package, I run as
> readme says:
>
> To run the demo using scripts:
> +
> +   1. Start Zookeeper and the Kafka server
> +   2. For simple consumer demo, run bin/java-simple-consumer-demo.sh
> +   3. For unlimited producer-consumer run, run
> bin/java-producer-consumer-demo.sh
>
> but I got such error,
>
>
> :bin/../../project/boot/scala-2.8.0/lib/*.jar:bin/../../core/lib_managed/scala_2.8.0/compile/*.jar:bin/../../core/lib/*.jar:bin/../../core/target/scala_2.8.0/
> *.jar:bin/../../examples/target/scala_2.8.0/*.jar
>
>  Error: Could not find or load main class kafka.examples.SimpleConsumerDemo
>
> But I already build the package under kafka directory, I can see the
> class in examples/target/classes/kafka/examples
>
>
> Any idea about this issue?
>
>
> thanks
>
>
>
>
> --
>
> Alec Li
>