How to reload a class or package in Scala REPL?

后端 未结 5 1069
面向向阳花
面向向阳花 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:14

    If the .scala file is in the directory where you start the REPL you can ommit the full path, just put :load myfile.scala, and then import.

提交回复
热议问题