――I was trying to build an environment to get my hands on Scala, but an error occurred when installing sbt.
updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (caskroom/cask).
No changes to formulae.
sbt: Java 1.8 is required to install this formula.
JavaRequirement unsatisfied!
You can install with Homebrew-Cask:
brew cask install java
You can download from:
https://www.oracle.com/technetwork/java/javase/downloads/index.html
Error: An unsatisfied requirement failed this build.
--In short, I'm angry that you should install it because java is not included.
However, java should have been installed because I proceeded with the following procedure before installing sbt.
brew cask install java
brew install scala
Reference URL In summary, java9 is included, but what sbt wants is java8. java9 was installed by brew cask install java. So, this can be solved by installing java8.
brew cask uninstall java
brew tap caskroom/versions
brew cask install java8
brew install sbt
$ sbt
[warn] No sbt.version set in project/build.properties, base directory: /Users/xxx/workspace/scala
-sample
[info] Set current project to scala-sample (in build file:/Users/xxx/workspace/scala-sample/)
[info] sbt server started at 127.0.0.1:5807
sbt:scala-sample>
After re-doing the above procedure, I was able to install sbt safely.
I hope it will be useful for people like me who have recently stumbled on the idea of "trying Scala for a while".