How to run Scala code in Intellij Idea 10

后端 未结 2 1354
星月不相逢
星月不相逢 2021-02-08 09:11

I have simple problem. I installed idea and scala plugin. Create project and add wants to run simple println(\"Hello world!\").

I create \"scala script\". A

2条回答
  •  攒了一身酷
    2021-02-08 10:10

    According to Getting Started with IntelliJ IDEA Scala Plugin:

    You can also turn your Scala object into a script. Just remove all declarations from the file, leave the executable statement only - println("Hello, World!"), and run the script as described above.

    However I confirm that it results with the same error as you quoted. I think this is a bug (or inaccurate documentaion), file a bug, Jetbrains guys are developing this plugin very actively.

提交回复
热议问题