java.lang.NoSuchMethodError: main Exception in thread "main" 这是出错信息,但是我程序有main阿 public class dostest { public static final double g = 32; public dostest() { } public static void main(String[] arg){ System.out.println(g+"hello world!"); } }
配置环境如下: Project property-->Run -->Application-->main class 中,选择含有Main method 的class, 在这儿应该是dostest
Exception in thread "main"
这是出错信息,但是我程序有main阿
public class dostest
{
public static final double g = 32; public dostest() {
}
public static void main(String[] arg){
System.out.println(g+"hello world!");
}
}
Project property-->Run -->Application-->main class
中,选择含有Main method 的class, 在这儿应该是dostest
认识一下可以嘛。
note that: 上个星期我刚做过类似的测试
直接在类上点右键,运行即可