码迷,mamicode.com
首页 > 编程语言 > 详细

Eclipse 软件 Java 解决:出现的editor does not contain a main type错误框 问题

时间:2018-07-31 13:34:38      阅读:263      评论:0      收藏:0      [点我收藏+]

标签:pat   tps   运行   clip   技术分享   解决   路径   path   lin   

Eclipse 软件 解决:出现的 editor does not contain a main type 错误框 问题

当你运行 Java文件是,如果弹出了下面的 错误框

 技术分享图片

出现错误的原因: 当前的源代码(所有的包)没有被添加到build path中:(src路径里面是文件目录的样子

 技术分享图片

解决方法: 对着:src 路径右键 -> Build Path -> Use as Source Folder

 技术分享图片

现在,src路径 应该是下面这个样子的:(不再是文件目录的样子了,而是Java包的样子)

 技术分享图片

搞定,现在在运行程序,eneditor does not contain a main type错误框就不会在出现了。



Eclipse 软件 Java 解决:出现的editor does not contain a main type错误框 问题

标签:pat   tps   运行   clip   技术分享   解决   路径   path   lin   

原文地址:https://www.cnblogs.com/ios9/p/9395066.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!