Could not find or load main class in scala in intellij IDE

please let me know if my question is unclear

I searched for this error, but the answers to this error were for java, but my case is scala,

I am trying to run this project in Intellij IDE sentimenAnalysis

but this generates an error and it is also a project structure class Not found

Update1 . According to the answers, adding $ at the end of the search class name enter image description here

update 2 after adding sbt task: enter image description here

update 3 my problem was solved by importing the project, instead of getting it directly from github, probably taht manual setup Mike Allen said that he could solve the problem, but I could not successfully apply it.

+6
3

, - . , scala . , Run Run scala SBT. scala SBT IDE?

SBT " " "build.sbt". - .

: This is how it looks to me

, . , :

My launch configuration

+8

, SBT Scala Library. , Scala/SBT. , .

+1

object object MyObject extends App , unested scala, - , .

Netsted intellij:

object External {
  object MyMain extends App // Could not find or load main class in scala in intellij IDE

}

:

object External { }
object MyMain extends App // Worked!
+1

All Articles