Please correct me if I am wrong.
When running java [-options] -jar jarfile with no explicit class name, if a single class exists within the jar that contains a public static void main(String[] args) method, that method will be invoked automatically. Right?
What happens if I have several classes that contain an eligible main method?
It uses the Main-Class defined in the MANIFEST file to determine which class contains the main method that should be run.
see http://java.sun.com/docs/books/tutorial/deployment/jar/appman.html