在eclipse中运行scala的配置 [英] run configuration for scala in eclipse

查看:160
本文介绍了在eclipse中运行scala的配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须运行scala程序。我得到错误主类没有找到。然后我打开喜好和在scala应用程序。主类列没有指定主类。你可以告诉我,我必须填写那个colummn才能运行我的programme.please帮助我提前提交

解决方案

您可以提供任何额外的信息吗?



我刚刚创建了一个Scala项目,右键单击新的Scala项目。保留所有默认值。创建以下对象

 对象HelloWorld {

def main(args:Array [String]): Unit = {println(Hello World!)}

}

右键单击包资源管理器中的文件,然后选择运行方式 - > Scala应用程序



我正在使用Eclipse
版本:3.5.2
构建ID:M20100211-1343



插件版本1.0.0.201011220809



检查您是否在Scala Perspective中,而不是Java。


hi i have to run a scala programme. i got the error Main class not found.then i open preferences and in scala application. main class column no main class specified . can u please tell me what must i have to fill in that colummn to run my programme.please help me.thanks in advance

解决方案

Can you provide any extra information?

I've just created a Scala project, right click new Scala Project. Keep all defaults. Created the following object

object HelloWorld {

    def main(args: Array[String]): Unit = { println("Hello World!") }

 }

Right click on the file in the Package Explorer and select "Run As" -> "Scala Application"

I'm using Eclipse Version: 3.5.2 Build id: M20100211-1343

Plugin version 1.0.0.201011220809

Check you are in the Scala Perspective and not Java.

这篇关于在eclipse中运行scala的配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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