I had the same problem when I was running a Scala program, for example. "Game.scala" from the terminal.
The compilation went fine, an error was shown when the code was run, see below
Rong wrong:
user@pc:~$scala Game.scala /home/$USER/.../src/ul/org/bloxorz/Game.scala:1: error: illegal start of definition package ul.org.bloxorz
Scala code should be called from the terminal in much the same way as Java code (you should give it the full class name, not the file name, as I did in the first example)
☑ correct:
user@pc:~$scala ul.org.bloxorz.Game
Milan Bojovic Jun 14 '19 at 6:49 2019-06-14 06:49
source share