You are confusing yourself with the approach here.
java -jar ----> This essentially ignores any classpath settings and just proceeds with finding everything within the jar that you are providing.
java -cp ---> If this form is used, you would specify all the jars that are to be referred by java as ";" separated (In Windows)/ ":" (In Non Windows) and then provide the class that contains the main() method so that Java can invoke it. Alternatively if your jar "myjar.jar" in this case, has a manifest file (which is some thing like a meta data file, which will contain information pertaining to what is the class that needs to be invoked to run the main method) you can skip specifying the class name that contains the main method which you want to be invoked.
For e.g., selenium-server-standalone-2.18.0.jar has a manifest file under META-INF folder as defined below
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.1
Created-By: 1.6.0-google-v4-55908-24403953 (Sun Microsystems Inc.)
Main-Class: org.openqa.grid.selenium.GridLauncher
Name: Build-Info
Selenium-Version: 2.18.0
Selenium-Revision: 15704
Selenium-Build-Time: 2012-01-27 15:48:16
So here if you see, we are telling java that it needs to by default invoke the main() method that resides within org.openqa.grid.selenium.GridLauncher
Disclaimer : This is all based on my limited understanding of how things work :)
Thanks & Regards
Krishnan Mahadevan
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"