Error: Main method not found in the file, please define the main method as: public static void main(String[] args)解决办法 public class App { public static void main(String[] args){ System.out.println("Hello Java"); } } 一定要对main函数传入一个String类型的参数,否则报错