今天是有Eclipse新建java工程、新建类HelloWorld,然后输入main函数,在main函数中写入System.out.println(“HelloWorld!”);,运行,提示“The selection cannot be lunched,and there are no recent lunches”
出错原因:定义main函数时少了static,应该是public static void main(String[] args),我少了static,导致运行失败。
Eclipse运行打印Hello World的java程序,提示“The selection cannot be lunched,and there are no recent lunches”
最新推荐文章于 2024-05-11 07:55:24 发布