Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
scala 2.12.1 runner tries to use unset $JAVA_HOME #10098
If environment variable JAVA_HOME is unset (like it's supposed to be) then when scala and scalac get to these lines added in bfa7ade0db ...
# Note that the version numbers go 1.7, 1.8, 9, 10, ... java_release="$(cat $JAVA_HOME/release | grep JAVA_VERSION)"
...it's the empty string and that translates into
% /p/inst/scala-2.12.1/bin/scala cat: /release: No such file or directory Welcome to Scala 2.12.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_112). Type in expressions for evaluation. Or try :help. scala>
Imported From: https://issues.scala-lang.org/browse/SI-10098?orig=1
My environment sets JAVA_HOME and adds JAVA_HOME/bin to the path when I switch JDKs, which is why I haven't noticed this.