Fatal error: scala object not found

I just installed scala via macports in osx

sudo port install scala28

I created a simple script called test.scala

println("hello world") 

when i run it through

scala test.scala

I get the following error:

 scala test.scala error: fatal error: object scala not found. one error found 

any ideas?

** UPDATE ** Starting from REPL gives correct results, but still cannot directly use "scala"

 Welcome to Scala version 2.8.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_24). Type in expressions to have them evaluated. Type :help for more information. scala> :load ./test.scala Loading ./test.scala... hi there sir scala> 

** UPDATE FINALLY **

when i did ps -ef | grep scala I had a couple of scala compiled servers, when I closed them and restarted my script, everything worked again. Must be in poor condition.

+4
source share
1 answer

turned out to be FSC in poor condition, restarted the FSC compiler

+7
source

Source: https://habr.com/ru/post/1344813/


All Articles