Scala Error: Could not find or load main class in both Scala IDE and Eclipse
I think this should be your folder structure
Scala0
└── src
└── main
└── scala
└── com.ks.sparkscala
└── FriendsByAge
In your case create a folder main/scala inside src and copy the package inside it.
Please follow here for the project structure
I hope this helped!
In the eclipse -->project properties-->scala compiler ---> change the scala installation.
It is working for me .