编辑器不包含主类型 [英] Editor does not contain a main type

查看:299
本文介绍了编辑器不包含主类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



这里是代码: http://www.scala-lang.org/node/45 。在Eclipse上运行它,我收到这个消息'编辑器不包含一个主要类型',阻止它运行。



有什么我需要做吗?即将该文件分解成多个文件,或什么?

解决方案

我有这个问题很多Eclipse和Scala。如果您清理工作区并重建项目,则有助于您。



有时,Eclipse无法正确识别哪些文件必须重新编译:(



编辑:
代码在Eclipse中正常运行


Just going through the sample Scala code on Scala website, but encountered an annoying error when trying to run it.

Here's the code: http://www.scala-lang.org/node/45. On running it on Eclipse, I got this message 'Editor does not contain a main type' that prevents it from running.

Is there anything I need to do...i.e break that file into multiple files, or what?

解决方案

I have this problem a lot with Eclipse and Scala. It helps if you clean your workspace and rebuild your Project.

Sometimes Eclipse doesn't recognize correctly which files it has to recompile :(

Edit: The Code runs fine in Eclipse

这篇关于编辑器不包含主类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆