I'm getting a common mistake for many programs which have been copied from exampe progams of sun.java during execution, which are compiled without errors.It is as below
Exception in thread "main"java.lang.NoSuchMethodError:main
Make sure the class you are executing contains the main method. If not, look for the class containing it. If there's any doc with the examples, try to read it.