Getting "cat: /release: No such file or directory" when running scala

Question

I tried installing Scala 2.12.1 on my Mac (El Capitan) via Homebrew and also by downloading the binaries at https://www.scala-lang.org/download/.

In both cases, whenever I run scala (or scalac, scaladoc, etc) I get this printed to screen:

cat: /release: No such file or directory

The action is successful however. E.g. scala myscript.scala works just fine, but that error message gets printed first.

Does anyone have an idea of why that's happening?


Show source
| osx   | scala   | osx-elcapitan   2016-12-16 23:12 1 Answers

Answers to Getting "cat: /release: No such file or directory" when running scala ( 1 )

  1. 2016-12-16 23:12

    Opening up bin/scala, there's a line:

    java_release="$(cat $JAVA_HOME/release | grep JAVA_VERSION)"

    My $JAVA_HOME wasn't set. All fixed now.

Leave a reply to - Getting "cat: /release: No such file or directory" when running scala

◀ Go back