Why I can't execute scala file?

前端 未结 9 2059
日久生厌
日久生厌 2020-12-10 02:49

I am a newbie to Scala, it\'s the first time I\'m running Scala, when I installed Scala, I created a file named Hello.scala, the content is:

pr         


        
9条回答
  •  暖寄归人
    2020-12-10 03:13

    • Adding -nc flag saved my day.

      scala -nc Hello.scala

    • What is -nc?

      -nc no compilation daemon: do not use the fsc offline compiler

      Source: http://alvinalexander.com/java/jwarehouse/scala-2.11/compiler/scala/tools/nsc/GenericRunnerCommand.scala.shtml

    • What is fsc offline compiler?

      fsc – Fast offline compiler for the Scala 2 language

      Source: http://www.scala-lang.org/old/sites/default/files/linuxsoft_archives/docu/files/tools/fsc.html

提交回复
热议问题