(Beginner question) Configure Eclipse Scala IDE to run Scala program

59 views
Skip to first unread message

Alex

unread,
Jun 22, 2015, 5:47:08 AM6/22/15
to scala...@googlegroups.com
Hello,
I am a beginner in Scala.I installed Scala Eclipse IDE, created simple program and trying to run it.
But when I click Run As it doesn't show "run as Scala app", how can I fix it?
I attach screenshot so that you can see my program, project structure, "run as" configuration:
 



Sonnenschein

unread,
Jun 22, 2015, 10:33:04 AM6/22/15
to scala...@googlegroups.com
Did you try to click on the object Observer?

Alex

unread,
Jun 22, 2015, 1:18:31 PM6/22/15
to scala...@googlegroups.com
Yes, in that case "Run as" menu is empty, it shows only "Run Configurations...".
It seems I have found the cause. 
Everything is OK when I create project when "Use default location" option is ticked.
But I need to place project into another directory.
How can I fix it?

BR,
Alex

Alex

unread,
Jun 23, 2015, 3:24:41 AM6/23/15
to scala...@googlegroups.com
Problem is solved. I just changed / added default working place when Eclipse starts.

Sonnenschein

unread,
Jun 23, 2015, 3:29:21 AM6/23/15
to scala...@googlegroups.com
In general I'd suggest to set up your project in SBT first. Add the SBT Eclipse plugin to SBT and let it generate the Eclipse files.
Btw., "extends App" is an alternative to "def main" meaning you don't need both.

Alex

unread,
Jun 23, 2015, 7:54:48 AM6/23/15
to scala...@googlegroups.com
Thanks!
Reply all
Reply to author
Forward
0 new messages