OiRc
OiRc

Reputation: 1622

Scala running issue on eclipse

I configured everthing within eclipse for scala. I create a snippet to show you the issue, i can't see in run options run as scala application, i also tried to find my main class under build configuration option but i can't find it.

screenshotaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

How i can solve it?

Upvotes: 0

Views: 67

Answers (2)

jay fall
jay fall

Reputation: 364

to run as scala application, you need to create Scala App and not class

In eclipse, package explorer select project/src/package right click new>scala app

inform Name e.g. Test and click "finish"

select Test.scala right click "run as Scala Application"

see results in console window.

Upvotes: 1

Jean Logeart
Jean Logeart

Reputation: 53809

Replace class with object.

You can even have it extend Application so it can look like:

object afaf extends Application {
    println("Done.")
}

Upvotes: 0

Related Questions