I am trying to build java client for rabbitmq.
I have my source folder as A.mq.client
.
Also I have a libs
folder where I have my rabbitmq jar files. These jars have been added to build path. Everything works OK in Eclipse.
Then I export the entire project in eclipse as jar. jar contents are .classpath, libs folder and my package folder + rest of stuffs.
Now I am getting exception :
java.lang.ClassNotFoundException: com.rabbitmq.client.Consumer
com.rabbitmq.client.Consumer
is in lib jars.
I am running jar using java -cp rabbit.jar A.mq.client.Worker
where I want to invoke main method of worker class in my package and Worker
is accessing jar packages.