Does scala support scala run xxx.scala? The go language supports running like
go my.go
and python supports
python my.py
but it seems
scala xxx.scala
is only a syntax check, no output or running behavior is observed. So is there a way to run a scala file directly?
Before running scala source code, you need to compile scala code by using
scalac filename.scalacommand. To execute compiled scala file you need to type following command:scala filename