初級 › Main method not found in class の原因と直し方 › パターン4
Main method not found in class の原因と直し方
コンパイルは通るのに実行できない典型。
1 public class Main { 2 public static void main(String[] args______________) { ^ 3 System.out.println("Hello"); 4 } 5 }
Error: Main method not found in class Mainexited with code 1
空欄を埋めてビルドを通す
エントリーポイントとして認識されるのはString[]単独の引数を持つmainだけです。余分な引数があると別のメソッドとして扱われ、起動時に見つかりません。
次の問題