Rajarshi Bhadra
Rajarshi Bhadra

Reputation: 1944

Unable to run Scala code in eclipse

I am very new to scala and I am trying to run a simple code. How ever I am getting this prompt asking for main class and I dont know to get around it. I have attached a screenshot. Any help would be greatly appreciated

enter image description here

EDIT

I have removed package greeting and yet the problem persists enter image description here

My workspace loks like this

enter image description here

When I try to run it looks like this enter image description here

Upvotes: 2

Views: 258

Answers (1)

Pim Verkerk
Pim Verkerk

Reputation: 1066

For Eclipse your package in your Scala file should match your folder structure, otherwise it will not find your main.

So either put the scala file in a folder called greeter or remove package greeter.

I am pretty sure this is a bug in the Scala IDE.

Upvotes: 1

Related Questions