configure run in eclipse for Scala

后端 未结 14 1713
自闭症患者
自闭症患者 2021-01-30 16:03

I am a beginner in Scala. I installed Scala IDE in eclipse and now I want to run my application programme. It never shows \"run as Scala application\", instead it shows \"run

14条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-30 16:41

    make sure your declared package in your source code matches the directory structure under your source directory.

    in this case, a sourcefile declaring package "greeter" will auto-run as scala if the source file is indeed under src/greeter/Hello.scala (and not just under src/Hello.scala)

    Its a common mistake that doesn't get highlighted by the syntax checker.

提交回复
热议问题