If you say -cp somejar.jar , you add somejar.jar to the classpath. He will try to find somejar.jar from the directory you are currently in when you typed the command.
If you say in the manifest
Class-Path: somejar.jar
you say, add jar, somejar.jar to the class path from the directory in which the manifest is located (it is inside the jar).
As a side note, when you specify a class path using -jar, -cp, or -classpath, you override the CLASSPATH system variable.
More information can be found here http://docs.oracle.com/javase/tutorial/deployment/jar/downman.html
source share