Help running scala from command line on MacOS

#1

Until now I have only run scala from within IntelliJ, but I know it is installed because IntelliJ runs fine. How can I now run scala interactively from the UNIX command line? Part of this is of course as MacOS issue, but there is no scala executable in my PATH environment variable.

sh> scala
-bash: scala: Command not found.
sh> scalac
-bash: scalac: command not found

When I installed scala for IntelliJ, did it also install the normal executables, or do I need to install those separately?

#2

I have now installed scala via homebrew. I am able to execute scala from the command line. However, don’t I now have scala installed twice, and possibly differently?

#3

IntelliJ can install its own version, which is likely what happened initially. If you want them to be the same, you can point IntelliJ to the version of Scala you installed via Homebrew.

1 Like
#4

IntelliJ Scala plugin comes with its own Scala presentation compiler, which only goes as far as typing.