New Java programmers often encounter these messages when they attempt to run a Java program.
Error: Main met
The problem is that you do not have a public void main(String[] args)
method in the class you attempt to invoke.
It
static
Note, that you HAVE actually specified an existing class (otherwise the error would have been different), but that class lacks the main method.
If you are running the correct class and the main is properly defined, also check if you have a class called String defined in the same package. This definition of String class will be considered and since it doesn't confirm to main(java.lang.String[] args)
, you will get the same exception.
Suggestion is to never hide library java classes in your package.