Editor does not contain a main type

后端 未结 30 2350
执笔经年
执笔经年 2020-11-27 13:51

Just going through the sample Scala code on Scala website, but encountered an annoying error when trying to run it.

Here\'s the code: http://www.scala-lang.org/node/

30条回答
  •  -上瘾入骨i
    2020-11-27 14:28

    One more thing to check: make sure that your source file contains the correct package declaration corresponding to the subdirectory it's in. The error mentioned by the OP can be seen when trying to run a "main type" declared in a file in a subdirectory but missing the package statement.

提交回复
热议问题