I can't get scalac working despite scala
successfully opening scala>
in the terminal.
I suspect this is something to do with setting scala_home in my .bash_profile
, on my mac.
What is the correct value for SCALA_HOME
, or how do I find that correct value? (it was homebrewed)
And is the method to scale-compile the following:
to cd into the lower src
folder and scalac IntroducingScala.HelloWorld.scala
?
On Mac Intel, Homebrew installs itself into the /usr/local/bin directory, which is already configured for access by the shell with the macOS default $PATH environment variable (the default is set by the /usr/libexec/path_helper command).
Type scala -version in your terminal. If the output shows that Scala 2.11. 1 (or higher) is installed, then you are done. Otherwise, download the file scala-2.11.
Homebrew usually tells you where it installs if you do brew info <name>
. It's usually points at /usr/local/opt/<name>
, which will be a symlink to the current version you're running.
When I run brew info scala
it also comes with a helpful caveat:
==> Caveats
To use with IntelliJ, set the Scala home to:
/usr/local/opt/scala/idea
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With