How to reload a class or package in Scala REPL?

后端 未结 5 1056
面向向阳花
面向向阳花 2020-12-24 00:50

I almost always have a Scala REPL session or two open, which makes it very easy to give Java or Scala classes a quick test. But if I change a class and recompile it, the RE

5条回答
  •  粉色の甜心
    2020-12-24 01:15

    There is an command meet you requirement

    :load path/to/file.scala
    

    which will reload the scala source file and recompiled to classes , then you can replay you code

提交回复
热议问题