The java program needs the specific main() method defined in the class that is passed to it. If the commandline is:
java TheClass then TheClass class must have the main() method.
The main() method in your code is NOT the one required by java.
Syntax for main method in Java :
public static void main(String args)
This main method is called whenever a java program is started. The only exception is in applets, where they're not calling "main" but "init".