MyEclipse上有main函数类运行报错:Editor does not contain a main type
2017-06-15 17:17
471 查看
MyEclipse下有main函数类运行报错:Editor does not contain a main type
出现这种问题的原因是,该java文件所在的包没有被MyEclipse认定为源码包。处理方法如下:
1.打开Java Build Path窗口,并选择Source界面:
2.点击 Add Folder,在对话框中选择该类的根级包,后点确定:
3.之后点击确定,等待工作空间build好以后,该项目如下图所示,即为成功:
4.出现文件夹带 “田” 图标的就是成功了,现在就,可以运行改类的main方法了。
出现这种问题的原因是,该java文件所在的包没有被MyEclipse认定为源码包。处理方法如下:
1.打开Java Build Path窗口,并选择Source界面:
2.点击 Add Folder,在对话框中选择该类的根级包,后点确定:
3.之后点击确定,等待工作空间build好以后,该项目如下图所示,即为成功:
4.出现文件夹带 “田” 图标的就是成功了,现在就,可以运行改类的main方法了。
相关文章推荐
- 使用eclipse运行带有main函数的Java文件时,出现editor does not contain a main type的错误框
- Eclipse下有main函数类运行报错:Editor does not contain a main type
- eclipse 中运行代码 出现:editor does not contain a main type
- Editor does not contain a main type 问题解决
- editor does not contain a main type的解决方案
- editor does not contain a main type" 错误解决方
- 在Elcipse导入项目时提示:editor does not contain a main type的解决方案
- editor does not contain a main type的问题
- eclipse解决editor does not contain a main type的方法
- editor does not contain a main type的解决方案
- editor does not contain a main type
- "editor does not contain a main type" 错误解决方法
- eclipse解决editor does not contain a main type的方法
- editor does not contain a main type的解决方案[ZT]
- eclipse解决editor does not contain a main type的方法
- editor does not contain a main type的解决方案
- editor does not contain a main type的解决方案
- editor does not contain a main type的解决方案
- Eclipse editor does not contain a main type的解决方案
- eclipse解决editor does not contain a main type的方法