-cp java command parameter must be placed before the class name:
java -cp .;activemq-all-5.3.2.jar consumer1
Otherwise, it is considered as an argument to your main method, and not as a java argument. Also note that if you specify the class path with the -cp parameter, you need to include the current directory in order to run .class files from it.
source share