I think you do not have a main method in your class as the error suggests.
Please replace the static with bellow syntax
PFB Syntax for main() in Java
public static void main(String args)
and it works fine for me.
Also please note it is not possible to run a Java program without main method so you are getting the error.