10

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. current bash_profile 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: enter image description here to cd into the lower src folder and scalac IntroducingScala.HelloWorld.scala?

2 Answers 2

9

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
1
  • 1
    thanks @colinjwebb :) whenever opened terminal informs me /usr/local/opt/scala/idea (brew came up with that on mine too) is a directory. If i extend this address down to scala-compiler.jar I get a permission denied. If i ignore terminal and try and compile it seems to create a package+class within the package+class. What do you think is the next step?
    – jMan
    Commented Apr 2, 2017 at 15:30
0

we can usually know the path using below:

which scala

Not the answer you're looking for? Browse other questions tagged or ask your own question.