Editor does not contain a main type

后端 未结 30 2458
执笔经年
执笔经年 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条回答
  •  星月不相逢
    2020-11-27 14:34

    For me, in Eclipse 3.6, this problem occurs when my main method is not public. I caused the problem by having a main method like this:

    static void main(String[] args) 
    

    The dubugger was unable to detect this by itself. I am pretty suprised Eclipse overlooked this.

提交回复
热议问题