steps
Use JDK 8.
$ touch build.sbt
$ sbt -Dsbt.version=2.0.0-RC9
problem
$ sbt -Dsbt.version=2.0.0-RC9
[info] server was not detected. starting an instance
[error] failed to connect to server
This is somewhat confusing error since it hides the server error.
expectation
If the sbt runner script detects JDK lower than JDK 17, it should fail to launch sbt 2.0, and print out a message to stderr:
[error] sbt 2.x requires JDK 17 or above