Downgrading Homebrew's default Java version

Viewed 1226

Recently i used brew upgrade and now my sbt seems to be using bersion 16 java, i cant actually find this version on my machine and need to set it back to java version 8 that is on my laptop. I have two questions:

  1. Whats going on here how is it using version 16 when my laptop doesnt seem to have it?
  2. How do i get my sbt to using java version 8 again?
1 Answers

I would expect SBT to work fine with Java 16, and be able to compile your code to Java 8, if needed.

In any case, brew install openjdk@8

Alternatively, don't use homebrew to manage JVM things, and try https://sdkman.io

Related